Azzera filtri
Azzera filtri

E = m*c^2 as Symbolic Equation

11 visualizzazioni (ultimi 30 giorni)
JPS
JPS il 12 Set 2020
Risposto: madhan ravi il 12 Set 2020
Hello,
I have been learning to use Symbolic Equations in MATLAB. I stumbled upon this question of writing Einstein's Mass Energy Equation in MATLAB. I tried the following code.
syms E m c
lhs = E
rhs = m * c^2
EinsteinEquation = lhs == rhs
But the output has been E = c^2 * m.
Why does this occur?
How to display the equation as I want it to be?

Risposta accettata

madhan ravi
madhan ravi il 12 Set 2020
Note: Don’t name a variable *lhs and rhs, there exist functions already.

Più risposte (0)

Categorie

Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange

Tag

Prodotti


Release

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by