matlab a a graph plot

조회 수: 2 (최근 30일)
NAS
NAS 2020년 6월 2일
편집: NAS 2020년 9월 26일
as

채택된 답변

KSSV
KSSV 2020년 6월 2일
%wava tank problem
clc; %clear workspace command window
%input
a=0.5;
rho=1030;
g=9.81;
l=30;
L=5.216;
d=2;
T=2;
w=2*pi/T;
k=2*pi/L;
Nx=80;
Nz=80;
Nt=5;
Lx=30;
Lt=4;
%end
x=linspace(0,L,Nx); %mesh
z=linspace(0,-d,Nz); %mesh
t=linspace(0,Lt,Nt); %mesh
[X,Y] = meshgrid(x,z) ;
dphix = zeros(size(X)) ;
dphiy = zeros(size(Y)) ;
for i = 1:length(t)
dphix = a*w/k*exp(k*Y).*cos(k*X-w*t(i)) ;
dphiy = a*w*exp(k*Y).*sin(k*X-w*t(i)) ;
quiver(X,Y,dphix,dphiy)
axis tight
drawnow
end
  댓글 수: 1
NAS
NAS 2020년 6월 2일
Thankyou sir .......

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by