MATLAB SYMBOLIC MATH TOOLBOX 5 - MUPAD Manuale Utente Pagina 6

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 19
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 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.
Vedere la pagina 5
1 2 3 4 5 6 7 8 9 10 11 ... 18 19

Commenti su questo manuale

Nessun commento