MATLAB Answers


Setting variables to constants in MATLAB

Asked by Deepa Maheshvare on 25 Apr 2019
Latest activity Commented on by Deepa Maheshvare on 25 Apr 2019
I have a set of differential equations and I want to set some of the variables to be constant.
For instance,
dy1dt = f(..)
dy2/dt = g(..)
Here, want to set y2 to be constant always.
constant y2;
Is this the right to deifne y2 to be constant?


Show 1 older comment
What do you mean by setting variables to constant?
on 25 Apr 2019
Set dy2/dt = 0. This makes y2 remain at its initial value.
Thank you, everybody

Sign in to comment.


0 Answers