Hi, plz help me out in this problem
1 次查看(过去 30 天)
显示 更早的评论
Hi, I am trying to find roots of the equation in Matlab, using code "ist line: p = [ 2 22 0 184] 2nd line: r = roots(p)" but I get the message "??? Attempt to execute SCRIPT roots as a function:"........so what should I do...help me plz
0 个评论
采纳的回答
Image Analyst
2015-5-22
You didn't happen to call your m-file roots.m did you? If so, then when it runs this script, it tries to call itself as a function when it hits this line:
r = roots(p)
So it's trying to recursively call itself. But it's not a function that takes any arguments - it's just a simple script, so you get that error.
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!