Info

此问题已关闭。 请重新打开它进行编辑或回答。

how to manipulate for loop with a changing variable in an expression to get outputs

1 次查看(过去 30 天)
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 个)

此问题已关闭。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by