Filter löschen
Filter löschen

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

2 Ansichten (letzte 30 Tage)
soe min aung
soe min aung am 16 Jun. 2020
Kommentiert: soe min aung am 16 Jun. 2020
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

Akzeptierte Antwort

KSSV
KSSV am 16 Jun. 2020
Bearbeitet: KSSV am 16 Jun. 2020
Z1 = eta2(X1,Y1) ;
Z1 is a complex matrix. USe either real, imag, abs to use surf.
surf(X,Y1,abs(Z1))
  1 Kommentar
soe min aung
soe min aung am 16 Jun. 2020
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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Graphics Objects finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by