Obtain an output in sequential multiplication using matlab
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
Roger Stafford
el 13 de Sept. de 2013
Use matlab's 'prod' function:
Zt = prod(Z1);
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!