how can i sum the final multiplication
Afficher commentaires plus anciens
Hi There, when i run this code I'm left with four values for A which are the right in values, but summing the four answers all together is what I'm actually looking for. NOTE: ReducedStiffness & Qbar are both functions defined in advance thank you for your help
clear
Q=ReducedStiffness(5.6,1.2,0.26,0.6);
Qbarr=zeros(3,3,4);Z=zeros(1,1,4);th=[0 90 90 0];z=[0:0.005:0.02];
for ii=1:4
Qbarr(:,:,ii)=Qbar(Q,th(ii));
end
for ii=1:4
Z(:,:,ii)=z(ii+1)-z(ii);
end
A=Qbarr.*Z;
A(:,:,1) =
0.0284 0.0016 0
0.0016 0.0061 0
0 0 0.0030
A(:,:,2) =
0.0061 0.0016 -0.0000
0.0016 0.0284 0.0000
-0.0000 0.0000 0.0030
A(:,:,3) =
0.0061 0.0016 -0.0000
0.0016 0.0284 0.0000
-0.0000 0.0000 0.0030
A(:,:,4) =
0.0284 0.0016 0
0.0016 0.0061 0
0 0 0.0030
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur PDE Solvers dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!