Line 34 * unknown operator
Show older comments
Confused about why this doesnt work at the end. The arrays all have the correct dimensions. Any help would be appreciated.
A=3;
E=4;
I=5;
le=2;
thetae=[pi/2;pi/4;pi/6];
c=cos(thetae);
s=sin(thetae);
N=numel(thetae); %counts elements of thetae vector
T=cell(1,N);
keprime=cell(1,N); %makes empty celled matrix
for i=1:N
keprime{i}=[A*E/le,0,0,-A*E/le,0,0;
0,12*E*I/le^3,6*E*I/le^2,0,-12*E*I/le^3,6*E*I/le^2;
0,6*E*I/le^2,4*E*I/le,0,-6*E*I/le^2,2*E*I/le;
-A*E/le,0,0,A*E/le,0,0;
0,-12*E*I/le^3,-6*E*I/le^2,0,12*E*I/le^3,-6*E*I/le^2;
0,6*E*I/le^2,2*E*I/le,0,-6*E*I/le^2,4*E*I/le];
end
for i=1:N
T{i}=[c(i),s(i),0,0,0,0; %Transfer Matrix set translates global coordinates to local coordinates
-s(i),c(i),0,0,0,0;
0,0,1,0,0,0;
0,0,0,c(i),s(i),0;
0,0,0,-s(i),c(i),0;
0,0,0,0,0,1];
end
T1=T(1);
T2=T(2);
T3=T(3);
ke1=T1.'*keprime(1)*T1;
ke2=T2.'*keprime(2)*T2;
ke3=T3.'*keprime(3)*T3;
2 Comments
madhan ravi
on 20 Jul 2020
Revived your question from the spam quarantine.
JONATHAN DAVID JR FREEMAN
on 20 Jul 2020
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!