

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


CS100M Section Exercise 5
%Given vector v, print its values for k= 1:length(v) fprintf(โ%d โ, v(k)) end fprintf(โ\nโ)
Complete the following function. The only built-in function that you can use is length.
function [val, ind] = myMin(v) % val is the minimum value in vector v. % ind is the position of the first occurence of val in v.