double summation. for loop
Mostrar comentarios más antiguos

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 comentarios
Rik
el 29 de Jul. de 2020
What is your question?
Saranika Das
el 29 de Jul. de 2020
Rik
el 29 de Jul. de 2020
Is there any particular reason you're using symbolic variables?
What is your end goal? Do you want to plot this function for a range of values of xp?
Saranika Das
el 4 de Ag. de 2020
Rik
el 4 de Ag. de 2020
If you need to find the values of xp, what values of F do you have?
Respuestas (0)
Categorías
Más información sobre Programming en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!