How to make a 3x3 matrix
Show older comments
Hello every one; I want to make a 3x3 general matrix using three different function as shown in code. It is working but I want to know how to save the results in three different lines of same matrix. Also how to run this matrix in command window for some defined value of theta. Thanks
syms theta;
for x=1:3
beta=0:2*pi/3:4*pi/3;
if x==1
L1 =cos(theta+beta);
elseif x==2
L2=cos(theta+beta-2*pi/3);
else
L3=cos(theta+beta+2*pi/3);
end
end
Accepted Answer
More Answers (0)
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!