Nested Loop with Matrices - Transfer Matrix Method
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Dear Community,
My problem has a two step question
Question 1) I have to produce a 2x3 system where each variable contains a 4x4 matrix (attached you will see a picture)
As you can see, this is the system (Global 2x3 while each variable has an 4x4 associated matrix)
for that I proposed the following script
l = 5;
J = 30;
E = 131960;
Matrix_1 = eye(4);
Matrix_0 = zeros(4,4);
B = [1,-l,(-l^3)/(J*E),(-l^2)/(J*E);0,1,(l^2)/(J*E),(l)/(J*E);0,0,1,0;0,0,l,1];
for i = 1:2
for j = 1:3
if A(i,j)==A(i,i)
A = [B] ;
elseif A(i,j) == A(i,i+1)
A = [B,-Matrix_1];
else A(i,j) = A(i,j);
A = [Matrix_0];
end
end
end
Point/Question 2) I need to integrate the whole system using Runge Kutta.
Problems :
1) the script runs without problem but I can't make the former assign to each position its respective associated matrix and store. How can I do that?
2) the problem is not Runge Kutta per se, I used it in the past. In this case, this system is related to a beam and therefore it has boundary conditions. Hence, I just have some initial zero values and final zero values and I dont know how to solve that. How would you solve it?
thanks for your Help!
0 Commenti
Risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!