Error: Attempt to execute SCRIPT Update_V_Jacobi_Metal_box as a function
2 次查看(过去 30 天)
显示 更早的评论
Hello,
So I'm attempting to run a program that gives me a solution to Laplace's equation using Jacobi's relaxation method which is a numerical method but I keep getting the same error message "Attempt to execute SCRIPT Update_V_Jacobi_Metal_box as a function" and I don't know why? Cause I defined it as a function in my code so it's not just a script. Here's my code:
0 个评论
采纳的回答
Walter Roberson
2019-10-15
You used Update_V_Jacobi_Metal_box as the name of your script. That prevents MATLAB from finding the function Update_V_Jacobi_Metal_box that is stored inside the script. Functions that are stored inside of scripts must not be named the same thing as the script is.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 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!