Info
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
how can i create a silce for a 3d symbolic function?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
i have a 3d function like T(x,y,z) and i want to crate a slice to display the values of my symbolic function my code:
a=3.488*(10^(-7)); h=[23.07,4.88,7.05,8.03]; k=0.589; L=[0.08,0.02,0.02]; s(1,1)=-h(1,1)/k; s(1,2)=h(1,2)/k; s(2,1)=-h(1,3)/k; s(2,2)=h(1,3)/k; s(3,1)=-h(1,4)/k; s(3,2)=h(1,4)/k; j=[19.08212187,49.67302555,85.13522527,122.5160906,160.7073843,199.2910912,238.0893181,277.0162268,316.0259510,355.0919439,394.1978410,433.3330307,472.4903414,511.6647576,550.8526686,590.0514105,629.2589754,668.4738218,707.6947468,746.9207983;33.91229065,164.3452559,317.9199894,473.7631943,630.2163376,786.9181186,943.7452021,1100.644179,1257.588197,1414.562287,1571.557450,1728.567950,1885.589959,2042.620825,2199.658651,2356.702048,2513.749971,2670.801623,2827.856382,2984.913758;36.09462635,165.3029101,318.4350792,474.1116890,630.4790881,787.1288357,943.9210348,1100.795015,1257.720247,1414.679708,1571.663156,1728.664065,1885.678077,2042.702174,2199.734196,2356.772562,2513.816082,2670.863847,2827.915152,2984.969437]; for m=1:3 for n=1:20 f(m,1,n)=(((j(m,n)^2)+(s(m,1)*s(m,2)))^2)+(j(m,n)^2)*((s(m,2)-s(m,1))^2); f(m,2,n)=L(1,m)*((j(m,n)^2)+(s(m,1)^2))*f(m,1,n); f(m,3,n)=(s(m,2)-s(m,1))*((j(m,n)^4)-((j(m,n)^2)*s(m,1)*(s(m,2)-s(m,1)))-((s(m,1)^3)*s(m,2))); end end for m=1:3 for n=1:20 A(m,n)=(2*f(m,1,n))/(f(m,2,n)+f(m,3,n)); end end for m=1:3 for n=1:20 B(m,n)=sin(j(m,n)*L(1,m))+(s(m,1)/j(m,n))*(cos(j(m,n)*L(1,m))-1); end end for m=1:3 for n=1:20 C(m,n)=A(m,n)*B(m,n); end end syms x y z t X=0; Y=0; Z=0; for n=1:20 X=C(1,n)*(exp((-a)*(j(1,n)^2)*18348.62385*t))*(j(1,n)*cos(j(1,n)*0.08*x)-s(1,1)*sin(j(1,n)*0.08*x))+X; Y=C(2,n)*(exp((-a)*(j(2,n)^2)*18348.62385*t))*(j(2,n)*cos(j(2,n)*0.08*y)-s(2,1)*sin(j(2,n)*0.08*y))+Y; Z=C(3,n)*(exp((-a)*(j(3,n)^2)*18348.62385*t))*(j(3,n)*cos(j(3,n)*0.08*z)-s(3,1)*sin(j(3,n)*0.08*z))+Z; end teta=1-(X*Y*Z); T=38*teta+295; V=subs(T,t,0.0218); xslice = [0,0.5,1]; yslice = 0; zslice = 0; slice(x,y,z,V,xslice,yslice,zslice) colormap hsv
but it errors:
??? Error using ==> slice at 85 V must be a 3-D array.
but V is a 3-D sym function!!!
help me if you can
0 Commenti
Risposte (0)
Questa domanda è chiusa.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!