i want to see how the graphics work when one parameter is changed. but the graphics didn't change at all, help!

2 views (last 30 days)
this is my system equation
function dy = rigid(t,y)
dy = zeros(3,1);
dy(1) = 0.1668-0.001*y(1)*y(3)-0.00041*y(1);
dy(2) = 0.001*y(1)*y(3)-0.32*y(2);
dy(3) = 208*y(2)-4*y(3)-25*y(3)-0.001*y(1)*y(3);
end
%S(0)=400
%I(0)=0
%V(0)=10
%alpha=0.1668 grow rate of susceptible cell
%beta=0.001 infection rate
%sigma_1=4 rate of natural death of virus
%sigma_2=25 rate of virus death by antibody
%delta=0.00041 death rate of susceptible cell
%sigma=0.32 death rate of infected cell
%miu n=208. virus production rate
i saved it and made the second script which plot the equation :
[T,Y] = ode45(@rigid,[0 20],[400 0 10]);
plot(T, Y);
legend('susceptible','infected','virus cell')
title('Grafik Pergerakan Sistem Terhadap Waktu');
xlabel('time'); ylabel('amount of cell');
------
my question is, why when i change the parameter,let's say 208 to 500, the graph was still the same after i run them, and same goes if i change any number that's in the first file.. help me. thx before.

Accepted Answer

Jan
Jan on 30 Apr 2012
Perhaps you have multiple files called "rigid.m"?
which rigid -all
You can set a breakpoint in the function to check, if it is really called.

More Answers (2)

Image Analyst
Image Analyst on 30 Apr 2012
Is it possible that you ran your main GUI without actually saving your rigid.m out to disk? Are any of the disk icons in the editor blue (not grayed out/disabled)? Make sure it's been saved.
Assuming it's been saved, set a breakpoint on that line and then run your main GUI. It should stop there and you can inspect values. If it doesn't stop there then you may actually be running some old version of rigid.m, like Jan says. So, does it stop at that breakpoint?

petot guy
petot guy on 1 May 2012
ok guys, i have solved the problem.
the problem is, it keep plotting my rigid.m file, so, i changed my parameter in my rigid.m file, and the graph changed accordingly.
thank you all for your help =)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!