double summation. for loop

12 vues (au cours des 30 derniers jours)
Saranika Das
Saranika Das le 29 Juil 2020
Commenté : Rik le 4 Août 2020
N = 16;
h=1/N;
b=(2/(N*200))^0.5;
c=(250000*h/(N*200))^0.5;
L=1;
xt=7/N;
syms xp m n
Fi=-((h*(b^2)/(c^2))^2)*(cos((2*m-1)*pi*xt/(2*L))*cos((2*n-1)*pi*xt/(2*L)))*((sin((2*m-1)*pi*xp*h/(2*L))*sin((2*n-1)*pi*xp*h/(2*L)))+(sin((2*m-1)*pi*xp*h/(2*L))*sin((2*n-1)*pi*xp*h/(2*L))))/(((2*m-1)*pi/(2*L))*((2*n-1)*pi/(2*L)));
for xp = 1:N
for m=1:N-1
for n=m+1:N
z(m) =subs(Bi);
z1(n) =sum(subs((z)));
end
end
B(xp)=subs(sum(z1));
end
disp(double(B'));
  5 commentaires
Saranika Das
Saranika Das le 4 Août 2020
Sir I am using symbolic variables to generalize the code. I need to find the values for xp and see its variation using a plot
Rik
Rik le 4 Août 2020
If you need to find the values of xp, what values of F do you have?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Produits


Version

R2013a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by