필터 지우기
필터 지우기

Execution of script as a function is not supported

조회 수: 802 (최근 30일)
Achraf AYEB
Achraf AYEB 2023년 2월 21일
댓글: Stephen23 2024년 5월 7일
Hello,
I donwloaded a function online. It works fine until the line 58 where I have "Execution of script mix_2d_lp_fonc as a function is not supported". I don't know why, I am sure I am in the correct folder (I wrote which...).
I would be gratefull for your assistance

채택된 답변

Stephen23
Stephen23 2023년 2월 21일
The problem is that you named the script mix_2d_lp_fonc
Then when the script gets to this line:
fcn_handles = mix_2d_lp_fonc(problem(K))
it tries to call the function mix_2d_lp_fonc.... but cannot, because that is what you called your script.
Solution: Give your script another filename.

추가 답변 (3개)

Keerthana
Keerthana 2024년 5월 7일
Execution of script bilinear as a function is not supported:
/MATLAB Drive/bilinear.mlx
  댓글 수: 1
Stephen23
Stephen23 2024년 5월 7일
You named your script BILINEAR, and then within that script you attempted to call a function named BILINEAR, e.g. this one:
Of course that will not work, because you named your script BILINEAR.
Solution: rename your script to something else, e.g. MY_BILINEAR.

댓글을 달려면 로그인하십시오.


Luca Ferro
Luca Ferro 2023년 2월 21일
편집: Luca Ferro 2023년 2월 21일
there is no definition of the function mix_2d_lp_fonc(), at least not in the file you shared. It's just the name of the script itself, so you could call it but cannot pass arguments as done at that line mix_2d_lp_fonc(problem(K)).
My guess would be that the first line, so teh declaration of the function, is missing somehow

Harish
Harish 2024년 3월 22일
이동: Stephen23 2024년 5월 7일
*Copy the program *Delete the file *create new file with different name *paste and execute

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by