Compile a simple function
显示 更早的评论
Hi everyone, I'm a very young user of Matlab and completely new to the programming world. I'm trying to do a simple matlab program that ables me to calculate a simple Mathematical equation ( Newton's Law F=m.a).
I've done this simple code:
function F = Newton(m, a)
F=m*a
end
So, if I in Matlab type:
x=Newton(2,2) I get the result correctly.
So I tried to compile this simple .m file with the help of deploytool. But when I finish to create the .exe file, when I click on it nothing happens.
And, if I go to that .exe file through DOS line command, I can see that the error I get is:
Error using newton (line2) Not enough input arguments. MATLAB:minrhs
So, I need your help. I'm very new to this so I'm sorry if it is a stupid question.
Thanks to all that will try to help me
Regards
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!