Someone help me. How to plot for this code to obtain figure?

조회 수: 1 (최근 30일)
soe min aung
soe min aung 2020년 7월 9일
답변: KSSV 2020년 7월 9일
clc
clear all
close all
syms x y
zeta0 = 1;
h = 2;
g = 0.0098;
vt=sqrt(g*h);
c=1;
v=c*vt
t1 = 50/v;
t2=200/v;
t=t1;
zeta=(1/(2*pi)^2)*200*zeta0*v*t*((exp(i*100*x)/(i*x))-(1/(i*x)))*((exp(-i*50*y)-exp(-i*150*y))/(i*y))
x = 0:100;
y = linspace(-150,-50,101);
[X1,Y1] = meshgrid(x,y);
Zsym = subs(zeta, {x,y},{X1,Y1});
Z = double(Zsym);
surf(X1,Y1,abs(Z))

채택된 답변

KSSV
KSSV 2020년 7월 9일
clc
clear all
close all
zeta0 = 1;
h = 2;
g = 0.0098;
vt=sqrt(g*h);
c=1;
v=c*vt
t1 = 50/v;
t2=200/v;
t=t1;
x = 0:100;
y = linspace(-150,-50,101);
[X,Y] = meshgrid(x,y);
zeta=(1/(2*pi)^2)*200*zeta0*v*t*((exp(i*100*X)./(i*X))-(1./(i*X))).*((exp(-i*50*Y)-exp(-i*150*Y))./(i*Y)) ;
surf(X,Y,abs(zeta))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by