Typing an equation in matlab with greek letters
25 次查看(过去 30 天)
显示 更早的评论
Hello,
I have a problem with the greek letters in the line below. How can i insert the greek letters and also multiply them with each other the same time?
rs=(kB*T)/(4*π*η*D0);
Thank you!
2 个评论
gonzalo Mier
2019-5-20
As far as I know you cannot use special symbols in matlab. You have to write them as pi and eta
dpb
2019-5-21
Indeed, not allowable, not just what you know... :)
variable-names has the rules.
It doesn't seem as though there really is any direct reason the character set couldn't be extended, but never seems to occur. Of course, there are potential issues with internationalization and not all character sets are the same, but doesn't seem insurmountable.
采纳的回答
Walter Roberson
2019-5-21
编辑:Walter Roberson
2019-5-21
syms kB T D0
Pi = evalin(symengine, '`π`');
nu = evalin(symengine, '`η`');
rs=(kB*T)/(4*Pi*nu*D0);
rs =
(T*kB)/(4*D0*`η`*`π`)
... Just don't ask to symvar(rs)
12 个评论
Walter Roberson
2023-1-13
编辑:Walter Roberson
2023-12-11
https://www.mathworks.com/help/symbolic/add-suffixes-to-symbolic-results.html is also important for this purpose
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!