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

1 visualización (últimos 30 días)
soe min aung
soe min aung el 16 de Jun. de 2020
Comentada: soe min aung el 16 de Jun. de 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

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Graphics Objects en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by