trying to perform a summation and its returning the value in separately in a matrice when i need a single answer.

3 ビュー (過去 30 日間)
syms x y z f g
%%%%%Variable Values%%%%%%%%%
theta=0;
n=0;
m=0;
k = (0.6569);
h = 11;
alpha = 2.57*10^(-7);
t=0;
L=(.051);
W=(.01);
H=(.005);
X=(.051/4);
Y=(.01/2);
Z=(.005/4);
beta = ((n+0.5)*pi);
eta = ((m/.01)*pi);
mew = (117);
lamda = (beta.*beta) +(eta.*eta)+ (mew.*mew);
%%%%%%%%DETERMINATION OF CONSTANT C%%%%%%%%%%%%%%%%
f(z,y,x) = cos(beta*z)*sin(mew*y)*cos(eta*x)*sin(eta*x);
C_nmp_numerator = int(int(int(f,z,[0 (H/2)]),y,[0 W]),x,[0 (L/2)]);
g(z,y,x) = (L/4)*(H/4)*((((-k*mew)/h)*(cos(mew*x))^2*sin(mew*x))+((sin(mew*x))^2*cos(mew*x)));
C_nmp_denominator = int(x,[0 (L/2)]);
C_nmp = C_nmp_numerator/C_nmp_denominator;
pretty(C_nmp);
%%%%%%%%DETERMINATION OF DEMENTIONLESS TEMP THETA%%%%%%%%%%%%%%%%
for n=0:10,m=0:10,t=0:10
theta = (C_nmp .* cos(beta.*z).*sin(eta.*y).*((-k.*mew)/h).*cos(mew.*x)+sin(mew.*x)).*exp(-(lamda.*lamda)*alpha.*t);
vpa(subs(theta, {x,y,z}, {X,Y,Z}));
end
theta;
vpa(subs(theta, {x,y,z}, {X,Y,Z}))
  1 件のコメント
Walter Roberson
Walter Roberson 2021 年 12 月 6 日
vpa(subs(theta, {x,y,z}, {X,Y,Z}));
That does the substitution, calculates a numeric approximation, and then throws the result away without displaying it because of the semicolon.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by