MATLAB Answers

numerical solution of a system of ODE which is not in standard form

2 views (last 30 days)
I' m wondering can MATLAB solve a system of ODE of these forms numerically?
I can change it to standard form but I have very large numbers which MATLAB has problem with it and I receive this massage:
Output truncated. Text exceeds maximum line length for Command Window display.
. I will upload my output. I want to solve these ODE numerically so I need the coefficient of all of terms in each eqaution. I utilized the collect cammand but it did not work. How cam I control and arrenge these large coeffisient. how can i determine each coeffisient correctly?
I would be gratefull if some one can help me.
thank you in advance
this is some terms of output differential equation
0000000000000000000*Iass^8*IBss^5*Ipss^4 - 191746860148563438549216527115219808387369783

Accepted Answer

Star Strider
Star Strider on 4 Jul 2020
It would likely help to have your code.
If you want more tractable numerical results, use the vpa function. The double function is also an option, however the arguments to it must not include any symbolic variables.
Star Strider
Star Strider on 6 Jul 2020
As always, our pleasure!
The ‘dde_fcn’ with the appropriate arguments should allow you to calculate ‘ddd’. I did not try that myself because I have no idea what the arguments should be.

Sign in to comment.

More Answers (1)

John D'Errico
John D'Errico on 5 Jul 2020
Your question seems to be one of solving a system of ODEs with a mass matrix. For example in the help for ODE45, we see this option:
ode45 can solve problems M(t,y)*y' = f(t,y) with mass matrix M that is
nonsingular. Use ODESET to set the 'Mass' property to a function handle
MASS if MASS(T,Y) returns the value of the mass matrix. If the mass matrix
is constant, the matrix can be used as the value of the 'Mass' option. If
the mass matrix does not depend on the state variable Y and the function
MASS is to be called with one input argument T, set 'MStateDependence' to
'none'. ODE15S and ODE23T can solve problems with singular mass matrices.
That seems to be the question you have posed.
So all you need to do is pass in the mass matrix as
M = [H11, H12;H21, H22];
If you compute these elements in symbolic form but still just numbers, then use double to convert them to double precsion numbers.





Community Treasure Hunt

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

Start Hunting!

Translated by