Obtain an output in sequential multiplication using matlab
Show older comments
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
Accepted Answer
More Answers (1)
Roger Stafford
on 13 Sep 2013
Use matlab's 'prod' function:
Zt = prod(Z1);
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!