필터 지우기
필터 지우기

using quiver to create a vector field for an equation with only 1 variable.

조회 수: 7 (최근 30일)
Elijah Jones
Elijah Jones 2023년 6월 27일
댓글: Elijah Jones 2023년 6월 27일
I have an equation which i am trying to use quiver to create a vector field for. the equation can be defined as this. yprime = alpha*y - beta*y.^2 - H where H = ((y.^3)*p)./((y.^3)+q) and alpha and beta are constants. so are p and q. everywhere I look though quiver is used to define problems with two equations. is there a way to use it for this equation?

답변 (1개)

KSSV
KSSV 2023년 6월 27일
alpha = rand ;
beta = rand ;
p = rand ;
q = rand ;
y = linspace(0,1) ;
yprime = alpha*y - beta*y.^2-(((y.^3)*p)./((y.^3)+q)) ;
dyprime = gradient(yprime) ;
plot(y,yprime)
hold on
quiver(y,yprime,yprime,dyprime)
  댓글 수: 2
Elijah Jones
Elijah Jones 2023년 6월 27일
편집: Elijah Jones 2023년 6월 27일
alpha = .75 ;
beta = .1 ;
p = 1.5 ;
q = 1.25 ;
y = linspace(0,1) ;
yprime = alpha*y - beta*y.^2-(((y.^3)*p)./((y.^3)+q)) ;
dyprime = gradient(yprime) ;
plot(y,yprime)
hold on
quiver(y,yprime,yprime,dyprime)
this is the stuff i have to put into this equation. it doesn't look correct. if this makes any difference yprime is also dy/dt. differential equation just doesn't have any t's in it. The direction field should though. I'm looking for the slop field that is y(t) using yprime above.
Elijah Jones
Elijah Jones 2023년 6월 27일
the direction field should be on of a logistic function

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

카테고리

Help CenterFile Exchange에서 Vector Fields에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by