How to visually check equations

24 ビュー (過去 30 日間)
George Peterson
George Peterson 2021 年 7 月 30 日
回答済み: Cris LaPierre 2021 年 7 月 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 Center および File ExchangeMathematics についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by