SyntaxFix
Write A Post
Hire A Developer
Questions
with many functions in matlab, you don't need to iterate at all.
for example, to multiply by it's position in the list:
m = [1:numel(list)]'; elm = list.*m;
vectorized algorithms in matlab are in general much faster.