MATLAB SYMBOLIC MATH TOOLBOX 5 - MUPAD Manuel d'utilisateur Page 6

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 19
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 5
Mupad can solve systems of equations too
You often want to solve an equation or system of equations, and then substitute that solution into a third
equation. You can use the ‘subs’ function to do this
All the [1]s and [2]s here are hard to understand. Their purpose to extract the solutions from the variable
‘sol.’ Notice that ‘sol’ is in curly parentheses {} (look at the example at the top of the page) this means
sol contains a set (which happens to contain only a single solution but in more complicated problems
there might be more than one solution). You need to extract the solution you want out of this set. Thus,
sol[1] extracts the first (and only) element from the set. In the first example, both the solutions for x and
y are extracted and substituted into eq3. In the second example, sol[1][1] substitutes only x. In the third,
sol[1][2] substitutes only y.
Of course not all equations can be solved exactly.
Vue de la page 5
1 2 3 4 5 6 7 8 9 10 11 ... 18 19

Commentaires sur ces manuels

Pas de commentaire