run a script
hi!
I have made a copy from a script in the editor. but it can't be compiled. i get error.
" error: invalid use of script /home/oo/maxmin.m in index expression "
my script is clear and bug-free
the script, which i copied
function [max, idx] = vmax (v)
idx = 1;
max = v (idx);
for i = 2:length (v)
if (v (i) > max)
max = v (i);
idx = i;
endif
endfor
endfunction
1
vote
Mostafa Sasan
shared this idea