Obtain an output in sequential multiplication using matlab
Afficher commentaires plus anciens
Hi all,
Can anyone help with proper codes in matlab to implement the program below:
% constants
n = 1;x=2;P=4;
Zc = 95;
Zo = 100;
% range of m to be computed for ZB
m = 0:10:800;
ZB = 1+((m)*sin(2*pi*n*x/P));
% Z1 for the range m = 0:10:800
Z1= abs(Zc*Zo*ZB);
% Sequential Z1 output multiplication
Zt = Z1*Z1*...*Zn % output from Z1 multiplied sequentially to the last one Zn
Hint: Z1... Zn are matrices
Réponse acceptée
Plus de réponses (1)
Roger Stafford
le 13 Sep 2013
Use matlab's 'prod' function:
Zt = prod(Z1);
Catégories
En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!