How to run a loop in linear differential equations in symbolic atmosphere?
Afficher commentaires plus anciens
Hi,
I have 6 symbolic functions i.e. y1 - y3 and c1 - c3, which I have used for defining linear ODE's.
The linear OD equations are as follows:
dy1/dt = (-c1*y1)+(c2*y2);
dy2/dt = (c3*y1)+(c2*y2)+(c3*y3);
dy3/dt = (c1*y1)+(c5*y2)+(c3*y3).
Now I want to define c's as constant values between two limits, i.e. c1=0.1 to 0.9; c2= 1 to 2.2 and c3=10 to 100.
Now what I want, to see effect of these equations with different constant values (c's), i.e. in loop form.
That is, I want to do two things:
1. Change c1 (from 0.1 to 0.9) and keep c2=1 and c3=10;
2. Change c1 (from 0.1 to 0.9) as well as c2 (from 1 to 2.2) and c3 (from 10 to 100).
And see values of y1, y2 and y3 in workspace or graph.
-----------------------------------------------------
I tried many times but all the time I get new type of error!! This time it is "In an assignment A(I) = B, the number of elements in B and I must be the same."!!
Please help me out. Thanks in advance.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!