Replace a multiple of two symbolic numbers
Mostra commenti meno recenti
Hi,
I'm attempting to replace (to linearise my equation) the multiple of two very small values dx and dy.
I attempted to use subs but it doesn't seem to work.
Code: PO=subs(PO,[(dx*dy),(dy*dx)],[0,0]);
PO is my symbolic vector. There is no error message but it just doesn't pick up the combination. Any Ideas?
Thanks!
Matlab Version: 2012a
Risposta accettata
Più risposte (1)
Walter Roberson
il 18 Ott 2012
0 voti
In the Symbolic Toolbox, the order of operands is treated algebraically, so any subexpression might get rewritten to an equivalent subexpression. For example, x*2*x would get rewritten to 2*x^2. When you replace dx*dy with dy*dx the order might get rewritten arbitrarily.
I do not know the order used by the Symbolic Toolbox. In another package I am familiar with, the order used is the order the operands were first encountered in (or so it used to be; the package added new controls around this in later releases.)
Categorie
Scopri di più su Utilities for the Solver in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!