Info
This question is closed. Reopen it to edit or answer.
how to manipulate for loop with a changing variable in an expression to get outputs
1 view (last 30 days)
Show older comments
I need the syntax to make a changing variable *z* output multiply each other sequentially 15 times for each f (for loop) computation as shown below and then display Y for each f stated.
for f = [1 4 8 10];
b = 2; c = 4;
z = 200.*[1.1.*ones(1,1) 0.9.*ones(1,1)];% repeated and multiplied sequentially 15 times for each findings of f
Y = f*b*c*(z1*z2*z3...*z15);
disp(Y); % display Y for f=1,4,8,10
end
0 Comments
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!