How to simplify symbolic calculation

10 Ansichten (letzte 30 Tage)
CEM CAKMAK
CEM CAKMAK am 29 Okt. 2018
Kommentiert: Walter Roberson am 29 Okt. 2018
Hi there everybody,
I have been trying to do symbolic calculation on Matlab, but the solution gives very unnecessary number which is described in below: "6.123e-17*qdot1 + 1.0*qdot2 + 1.0*qdot3 + qdot5 - 6.123e-17*cos(q5)*(3.749e-33*qdot1..."
This is an answer matrix column. I'd like Matlab to calculate 6.123e-17*qdot as 0 and like to avoid 1.0*qdot3. Could you help me about this problem?
Thanks in advance.
Have a nice day.
Best regards, Cem ÇAKMAK

Antworten (1)

madhan ravi
madhan ravi am 29 Okt. 2018
  4 Kommentare
Walter Roberson
Walter Roberson am 29 Okt. 2018
Those were not the ones I was thinking of; the one I was thinking of was quite similar to the current question.
Unfortunately I cannot locate it at this time.
The general idea is that it is possible to use evalin(symengine) or feval(symengine) to run some MuPAD code which will examine the structure of the expressions, locate constants with sufficiently small absolute value, and substitute zeros for them. This would probably involve using the MuPAD match() and subsex() and a loop.
John's answer that you linked to is still important: for sufficiently large numeric replacement values for symbolic variables, neglecting "small" contributions becomes risky.

Melden Sie sich an, um zu kommentieren.

Produkte


Version

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by