Error: Attempt to execute SCRIPT Update_V_J​acobi_Meta​l_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:

채택된 답변

Walter Roberson
Walter Roberson 2019년 10월 15일
You used Update_V_J​acobi_Meta​l_box as the name of your script. That prevents MATLAB from finding the function Update_V_J​acobi_Meta​l_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개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by