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

Rik
Rik 2020년 7월 29일
What is your question?
Saranika Das
Saranika Das 2020년 7월 29일
my coding is not giving correct result. I cannot find the mistake.
Rik
Rik 2020년 7월 29일
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
Saranika Das 2020년 8월 4일
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 2020년 8월 4일
If you need to find the values of xp, what values of F do you have?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

제품

릴리스

R2013a

질문:

2020년 7월 29일

댓글:

Rik
2020년 8월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by