Quantcast
Viewing all articles
Browse latest Browse all 41

Save multiple variables and values within a 'for' loop

If you are looking on how to save multiple variables and values within a 'for' loop then find below a simple MATLAB script code that will aid your learning

r=[]
for x = [10:2:20]
    for y = [1200:10:1250]
        z = x*y
        r = [r;x y z]
    end
end

Viewing all articles
Browse latest Browse all 41

Trending Articles