필터 지우기
필터 지우기

Exact solution for Burgers equation. How to write the matlab code with the given information? Multiple plots for different t's

조회 수: 6 (최근 30일)
Code to plot in matlab. Multiple plots on one graph
The Family of Solutions are:
u(x,t)=(-2*sinh(x))/(cosh(x)-exp(-t))
u(x,0)=(-2*sinh(x))/(cosh(x)-1) As t->0
u(x,t)=-2tanh(x) As t->infinity
x=linspace[-6,6]
t= [.2 .5 1 .2]
Plot should look similar to attachment

답변 (1개)

Mijiddorj Renchin-Ochir
Mijiddorj Renchin-Ochir 2017년 3월 22일
x = -6:0.1:6; hold all axis([-6 6 -4 4]); t=0; u=(-2*sinh(x))./(cosh(x)-exp(-t)); plot(x,u,'--'); for t=0.2:0.5:1.2 u=(-2*sinh(x))./(cosh(x)-exp(-t)); plot(x,u); end

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by