Using symbolic solve in matlab with maple symbolic toolbox, How to assign values to symbolic expressions and get numerical answer.
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I asked this question last week and got the answer: http://mathworks.com/matlabcentral/answers/17155-want-to-use-solve-with-non-symbolic-variables#answer_23124
This worked perfectly, however, when I used the actual function I want to solve 'solve' couldn't find a solution. Fortunately, I switched to the Maple symbolic toolbox and it solved the function. Now, though I can't use the method in the previous answer. Any ideas? I want to give values to a b and c and get a solution.
Thanks,
Chris
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 3 Okt. 2011
Do you have access to Maple itself? If so, copy the general expression in to it, solve() it, and then use Maple's CodeGeneration[Matlab] to create the corresponding MATLAB routine. You can also invoke this functionality within MATLAB if you have the Extended Symbolic Toolbox, but not if you have only the regular Symbolic Toolbox.
If the form of the function keeps changing or it is otherwise not possible or practical to use Maple's CodeGeneration routines, then to put specific numeric values in for constants, subs() the values in for the constants in the expression. You will probably wish to double() the symbolic numeric expression that results.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!