Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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

2 vues (au cours des 30 derniers jours)
segun
segun le 23 Avr 2014
Clôturé : MATLAB Answer Bot le 20 Août 2021
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

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by