How to visually check equations

37 Ansichten (letzte 30 Tage)
George Peterson
George Peterson am 30 Jul. 2021
Beantwortet: Cris LaPierre am 30 Jul. 2021
Now that MuPad is gone, how does one visually verify you have input your equation properly in matlab? I have had several articles direct me to the new "Live Script" document, but that has a LaTex equation input or the object oriented input similiar to word or overleaf. We shouldn't have to open a Wolfram Alpha website to doublecheck our Matlab equations.
For example, I needed to double check my fittype function
myfittype = fittype(''11.8.*8.85e-12.*area./((((m+2).*11.8.*8.85e-12)./(1.602e-19.*beta).*(Vbi-Va)).^(1./(m+2)))',...
'coefficients',{'Vbi','area','beta','m'},'independent',{'Va'});
I attempted to put that equation into the Life Script document LaTex input, and only got that 1-line back out.
I attempted the pretty function, and recieved an error because it contains a mix of arrays and symols.
Does anyone have an easy solution to this problem?
Thanks,
George

Antworten (1)

Cris LaPierre
Cris LaPierre am 30 Jul. 2021
You likely need the Symbolic Math Toolbox to do what you want. Note that it it will combine the numeric values in the process.
One way to do this is to use the displayFormula function.
syms Vbi area beta m Va
displayFormula('11.8.*8.85e-12.*area./((((m+2).*11.8.*8.85e-12)./(1.602e-19.*beta).*(Vbi-Va)).^(1./(m+2)))')

Produkte


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by