Matlab plotting direction field, stable or unstable?

2 vues (au cours des 30 derniers jours)
Robin
Robin le 26 Juil 2011
I'm trying to figure out which equilibrium solutions are stable and unstable for this differnetial equation (Gompertz model) y'=y(1-ln(y)(y-3), so here is my code:
%%-----------------------------------------------------------
[y]=solve('y*(1-log(y))*(y-3)=0'); % solving for the equilibrium solution
disp('The Equilibrium solutions are y=')
y
% plotting the direction field
figure, hold on
syms t c
[T Y]= meshgrid(0:.5:12, -5:.5:12);
S= Y.*(1-log(Y)).*(Y-3);
L=sqrt(1+S.^2);
quiver(T, Y, 1./L, S./L, 0.5), axis tight
xlabel 'S', ylabel 'y'
hold off
%%-----------------------------------------------
however the graph it self is sort of ambiguous, i am having difficulty "reading the direction field" from about 2.5 and 3- there appears to be a continuous of equilibrium solutions.
Does anyone have any idea as to why the graph appears to be inconclusive on this interval?
I tried to graph the function and I found the limit as the function went to zero, and I found that it was 0. But I still am not sure why it appears this way. I think maybe the maximum value of f(y) has to something to do with it?
%--------------------------------
% code for graphing f(y) and finding the limit:
clear all
f=@(y) (y.*(1-log(y)).*(y-3));
Y=0:.1:4;
Z=f(Y);
plot(Y,Z)
title 'Plot of y.*(1-log(y)).*(y-3)'
xlabel y
ylabel f(y)
syms y
limit(y*(1-log(y))*(y-3),y,0)

Réponses (0)

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by