Deciding when to call a Matlab function: Within my symbolic math code, or within my converted numerical code?
Show older comments
Hi there!
I wrote a symbolic math code and used the algebraic solver solve( ) to get the equations that I want. I then converted these equations to Matlab functions, using matlabFunction( ) and wrote these converted equations to a separate file. Then I have a file with a full system of numerical equations. And, last but not least, I have a file which will solve these numerical equations, using, say, ode45( ). My equations are not solvable analytically using dsolve( ).
My question is: At some point in my workflow, I have to call certain specific models / functions, which I've defined as Matlab functions, in separate .m-files. If I call a numerical Matlab function within my very first symbolic-math script, then must the function I'm calling also be symbolic? Is it perhaps better to call my numerical Matlab functions later in the workflow, such as after the conversion from symbolic to numerical? What is the best practice? I suspect that it is not converting numerical Matlab functions to symbolic functions; that does not seem sensible to do, but I could be wrong. (E.g. there are lots of parameters within each Matlab numerical function that are decimal representations, but perhaps this isn't really important.)
Thanks in advance!
Accepted Answer
More Answers (0)
Categories
Find more on Assumptions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!