Please help me someone! How to run for 3D?
조회 수: 1 (최근 30일)
이전 댓글 표시
clc
clear all
syms k k1 k2 x y
v=0.14;
L=100;
h=2;
t=5.95;
g=0.0098;
eta0=2;
w=sqrt(g*k*tanh(k*h));
A = i*k1*(50/pi)^2*(exp(i*100*k1)-1);
B = i*k2*(100/pi)^2*(exp(i*50*k2)+exp(i*150*k2));
C = i*k2*(100/pi)^2*(exp(-i*150*k2)+exp(-i*50*k2));
D = ((sin(w*t))/(w*cosh(k*h)))*((eta0*v)/(2*L));
E = (1-exp(-i*100*k1))/(i*k1);
F = (exp(-i*100*k1))/(1-((50*k1)/pi)^2);
G = (exp(i*150*k2)-exp(i*50*k2))/(i*k2);
H = 1/(1-(100*k2/pi)^2);
I = (4*sin(50*k2))/k2;
J = (exp(-i*50*k2)-exp(-i*150*k2))/(i*k2);
zeta_ = D*(E*A-F*A)*(G*B-H*B+I+J*C-H*C);
IFT1 = ifourier(zeta_,k1,x)
IFT = ifourier(IFT1,k2,y)
%For figure
xvals = 0:100;
yvals = linspace(-200,200,101);
[X,Y] = meshgrid(xvals, yvals);
Zsym = subs(IFT, {x, y}, {X, Y});
Z = double(Zsym);
surf(X,Y,Z)
댓글 수: 13
Walter Roberson
2020년 3월 9일
subplot(1,3,1)
surf(X, Y, real(Z))
title real
subplot(1,3,2)
surf(X, Y, imag(Z))
title imaginary
subplot(1,3,3)
surf(X, Y, abs(Z))
title abs
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!