Setting variables to constants in MATLAB

6 views (last 30 days)
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?
  4 Comments
Torsten
Torsten on 25 Apr 2019
Set dy2/dt = 0. This makes y2 remain at its initial value.

Sign in to comment.

Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!