Need help with writing equation

Hello, I need help in writing this equation.I tried writing my own and I need someone to confirm whether my equation is correct or not
ne=no*(1-(pg/pa))*(2*pg*(1-exp(d/t)))/(((pg*pa)/(pa-pg))+(pa*exp(d/t)))
Thank you

回答 (1 件)

Star Strider
Star Strider 2018 年 1 月 3 日

1 投票

It appears to me to be correct.
I would make one change, and that is to vectorise it (using the ‘dot operator’), in the event that one or more variables are vectors. (If more than one are vectors, all the vector variables must have the same row and column size.)
ne = no.*(1-(pg./pa)).*(2*pg.*(1-exp(d./t)))./(((pg.*pa)./(pa-pg))+(pa.*exp(d./t)))
With respect to vectorisation, see the documentation on Array vs. Matrix Operations (link) for details.

2 件のコメント

MUHAMMAD AZFAR BIN ISMAIL
MUHAMMAD AZFAR BIN ISMAIL 2018 年 1 月 3 日
thank you for the suggestion
Star Strider
Star Strider 2018 年 1 月 3 日
My pleasure.

この質問は閉じられています。

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by