Matlab 公式方程编辑器 GUI
我如何从 GUI 执行方程式? 例子: 我如何用各种类型的方程来做到这一点?
谢谢各位的解答。
How i can execute an equation from GUI?
Example:
How i can do this with various type of equation?
Thanks the answers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不完全确定你的意思,但我认为你想获取用户在文本框中输入的方程并将其转换为函数?
为什么您的
F
从 3 个参数变为 4 个?即F(x,y,y') --> F(1,0,5,-1)
在下一行? (您给出的 F 示例似乎与您的方程不匹配。)无论如何,请查看
eval()
,也许这就是您想要的。它以字符串形式接收 matlab 命令,例如
2 + 3
,并对其求值。那么
,但是无论如何,您希望用户如何输入平方根符号和平方符号呢?
eval()
方法依赖于输入 matlab 能够理解的语法。如果您进一步澄清您的问题,这会更容易。
I'm not entirely sure what you mean, but I think you want to grab the equation that a user types in to a text box and turn it in to a function?
Why does your
F
change from 3 arguments to 4? i.e.F(x,y,y') --> F(1,0,5,-1)
in the next line? (The examples of F you gave don't seem to match up with your equation..)In any case, check out
eval()
, perhaps that is what you want.It takes in a matlab command as a string, e.g.
2 + 3
, and evalutes it.So
But in any case, how do you expect the user to type in the square root symbol and the squared symbol? The
eval()
approach relies on them typing in syntax that matlab will understand.If you clarify your question a bit more this will be easier.