필터 지우기
필터 지우기

How to plot for this code to obtain the figure? Please!

조회 수: 2 (최근 30일)
soe min aung
soe min aung 2020년 6월 16일
댓글: soe min aung 2020년 6월 16일
clc
clear all
close all
t2 = 11.9;
eta = @(X,Y) (2^(1/2)*(- 200*pi*(- (42*pi*2^(1/2)*t2)/5 + (2*pi*sin((21*2^(1/2)*t2*(pi^2/2500)^(1/4)*(-(exp(-2*(pi^2/2500)^(1/2))/2 - exp(2*(pi^2/2500)^(1/2))/2)/(exp(-2*(pi^2/2500)^(1/2))/2 + exp(2*(pi^2/2500)^(1/2))/2))^(1/2))/5)*exp(2*(pi^2/2500)^(1/2))*exp(-(pi*X*1i)/50))/((pi^2/2500)^(1/4)*(exp(4*(pi^2/2500)^(1/2)) + 1)*(-(exp(-2*(pi^2/2500)^(1/2))/2 - exp(2*(pi^2/2500)^(1/2))/2)/(exp(-2*(pi^2/2500)^(1/2))/2 + exp(2*(pi^2/2500)^(1/2))/2))^(1/2)) + (2*pi*sin((21*2^(1/2)*t2*(pi^2/2500)^(1/4)*(-(exp(-2*(pi^2/2500)^(1/2))/2 - exp(2*(pi^2/2500)^(1/2))/2)/(exp(-2*(pi^2/2500)^(1/2))/2 + exp(2*(pi^2/2500)^(1/2))/2))^(1/2))/5)*exp(2*(pi^2/2500)^(1/2))*exp((pi*X*1i)/50))/((pi^2/2500)^(1/4)*(exp(4*(pi^2/2500)^(1/2)) + 1)*(-(exp(-2*(pi^2/2500)^(1/2))/2 - exp(2*(pi^2/2500)^(1/2))/2)/(exp(-2*(pi^2/2500)^(1/2))/2 + exp(2*(pi^2/2500)^(1/2))/2))^(1/2))) + (2*pi^(3/2)*exp(-(pi*X*1i)/50)*exp(-pi*Y*1i)*(pi^(1/2)*tanh(2*pi)^(1/2)*exp(2*((2501*pi^2)/2500)^(1/2))*sin((21*2^(1/2)*t2*tanh(2*((2501*pi^2)/2500)^(1/2))^(1/2)*((2501*pi^2)/2500)^(1/4))/5) + pi^(1/2)*tanh(2*pi)^(1/2)*exp(4*pi)*exp(2*((2501*pi^2)/2500)^(1/2))*sin((21*2^(1/2)*t2*tanh(2*((2501*pi^2)/2500)^(1/2))^(1/2)*((2501*pi^2)/2500)^(1/4))/5) - 2*tanh(2*((2501*pi^2)/2500)^(1/2))^(1/2)*exp(2*pi)*exp((pi*X*1i)/50)*sin((21*2^(1/2)*t2*pi^(1/2)*tanh(2*pi)^(1/2))/5)*((2501*pi^2)/2500)^(1/4) + pi^(1/2)*tanh(2*pi)^(1/2)*exp(2*((2501*pi^2)/2500)^(1/2))*exp((pi*X*1i)/25)*sin((21*2^(1/2)*t2*tanh(2*((2501*pi^2)/2500)^(1/2))^(1/2)*((2501*pi^2)/2500)^(1/4))/5) + pi^(1/2)*tanh(2*pi)^(1/2)*exp(4*pi)*exp(2*((2501*pi^2)/2500)^(1/2))*exp((pi*X*1i)/25)*sin((21*2^(1/2)*t2*tanh(2*((2501*pi^2)/2500)^(1/2))^(1/2)*((2501*pi^2)/2500)^(1/4))/5) - 2*tanh(2*((2501*pi^2)/2500)^(1/2))^(1/2)*exp(2*pi)*exp(4*((2501*pi^2)/2500)^(1/2))*exp((pi*X*1i)/50)*sin((21*2^(1/2)*t2*pi^(1/2)*tanh(2*pi)^(1/2))/5)*((2501*pi^2)/2500)^(1/4)))/(tanh(2*pi)^(1/2)*tanh(2*((2501*pi^2)/2500)^(1/2))^(1/2)*((2501*pi^2)/2500)^(1/4)*(exp(4*pi) + 1)*(exp(4*((2501*pi^2)/2500)^(1/2)) + 1)) + (2*pi^(3/2)*exp(-(pi*X*1i)/50)*exp(pi*Y*1i)*(pi^(1/2)*tanh(2*pi)^(1/2)*exp(2*((2501*pi^2)/2500)^(1/2))*sin((21*2^(1/2)*t2*tanh(2*((2501*pi^2)/2500)^(1/2))^(1/2)*((2501*pi^2)/2500)^(1/4))/5) + pi^(1/2)*tanh(2*pi)^(1/2)*exp(4*pi)*exp(2*((2501*pi^2)/2500)^(1/2))*sin((21*2^(1/2)*t2*tanh(2*((2501*pi^2)/2500)^(1/2))^(1/2)*((2501*pi^2)/2500)^(1/4))/5) - 2*tanh(2*((2501*pi^2)/2500)^(1/2))^(1/2)*exp(2*pi)*exp((pi*X*1i)/50)*sin((21*2^(1/2)*t2*pi^(1/2)*tanh(2*pi)^(1/2))/5)*((2501*pi^2)/2500)^(1/4) + pi^(1/2)*tanh(2*pi)^(1/2)*exp(2*((2501*pi^2)/2500)^(1/2))*exp((pi*X*1i)/25)*sin((21*2^(1/2)*t2*tanh(2*((2501*pi^2)/2500)^(1/2))^(1/2)*((2501*pi^2)/2500)^(1/4))/5) + pi^(1/2)*tanh(2*pi)^(1/2)*exp(4*pi)*exp(2*((2501*pi^2)/2500)^(1/2))*exp((pi*X*1i)/25)*sin((21*2^(1/2)*t2*tanh(2*((2501*pi^2)/2500)^(1/2))^(1/2)*((2501*pi^2)/2500)^(1/4))/5) - 2*tanh(2*((2501*pi^2)/2500)^(1/2))^(1/2)*exp(2*pi)*exp(4*((2501*pi^2)/2500)^(1/2))*exp((pi*X*1i)/50)*sin((21*2^(1/2)*t2*pi^(1/2)*tanh(2*pi)^(1/2))/5)*((2501*pi^2)/2500)^(1/4)))/(tanh(2*pi)^(1/2)*tanh(2*((2501*pi^2)/2500)^(1/2))^(1/2)*((2501*pi^2)/2500)^(1/4)*(exp(4*pi) + 1)*(exp(4*((2501*pi^2)/2500)^(1/2)) + 1))))/(160000*pi^2);
eta2 = @(X,Y)((0<=X) & (X<=100) & (-150<=Y) & (Y<=-50)).*eta(X,Y)
% figure
[X1,Y1]=ndgrid(-200:5:200);
surf(X1,Y1,eta2(X1,Y1))
grid on

채택된 답변

KSSV
KSSV 2020년 6월 16일
편집: KSSV 2020년 6월 16일
Z1 = eta2(X1,Y1) ;
Z1 is a complex matrix. USe either real, imag, abs to use surf.
surf(X,Y1,abs(Z1))
  댓글 수: 1
soe min aung
soe min aung 2020년 6월 16일
Thank you so much sir. Could you please give me you email address, I want to ask you about modeling of tsunami generation and propagation. Please help me sir.

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by