i am a newbie to SciLab and I am trying to plot a result of the matrix on a solution to the ODE . I am getting a little bit confused about minor issue , how do you differentiate the color of the plots ?
i have tried to give x(1) to ( 3 ) the color of plots , but the comp iler gives an error message of incompatible size of the matrix .
Any idea on how to sol,ve this ? Thank u very much fotr the explanation !
Here the code I copy from MATHEMATICS :
//trp operon conc nach Sinha , negative regulation
delta_M=0.48
delta_Y=0.03
delta_L=0.02
delta_P=0.04
a1=0.29
a2=0.01
a3=0.01
K2=2920000
K1=K2/100
RT=23.2
c1=18.8
d1=10
kL=60000
KML=680
kg=3600
KMg=700000
mu=0.7
t_M=0.2
g= 4
A=[-a1 0 1/RT-1/(RT)^2 ; c1 -a2 0; g^0.5 d1-delta_P a3]
function xdot=f(t, x)
xdot=A*x
endfunction
x0=[0.1 0.1 0.1 ]';
t0=0;
t=0:0.1:2;
x = ode(x0,t0,t,f);
plot(t,x(1),'r-',t,x(2),'b-x',t,x(3),'y-d')
You might have more success if you give the correct slice of the array to plot.
Use