필터 지우기
필터 지우기

Section can't find private function

조회 수: 3 (최근 30일)
Jean-Paul Rozestraten
Jean-Paul Rozestraten 2020년 12월 16일
답변: Isabelle Levy 2020년 12월 17일
I've got a script that has been broken down into sections and which uses functions which I've put in a private/ folder. When running the entire script it can find the functions without problem, but when I run a single section, it gives me the error:
Undefined function 'createFit' for input arguments of type 'struct'.
Is this because MATLAB runs scripts and section differently?

채택된 답변

Isabelle Levy
Isabelle Levy 2020년 12월 17일
Hi Jean-Paul,
Your observation is correct. To evaluate a section, the script must contain all the values it requires, or the values must exist in the MATLAB workspace. To learn more about evaluating code sections, you can visit the documentation page here: https://www.mathworks.com/help/matlab/matlab_prog/run-sections-of-programs.html
I hope this helps.
-Isabelle

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by