How to visually check equations

22 次查看(过去 30 天)
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

回答(1 个)

Cris LaPierre
Cris LaPierre 2021-7-30
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)))')

类别

Help CenterFile Exchange 中查找有关 Mathematics 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by