Effacer les filtres
Effacer les filtres

Using symbolic solve in matlab with maple symbolic toolbox, How to assign values to symbolic expressions and get numerical answer.

4 vues (au cours des 30 derniers jours)
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

Réponse acceptée

Walter Roberson
Walter Roberson le 3 Oct 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.

Plus de réponses (0)

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by