Unrecognized function or variable

조회 수: 1 (최근 30일)
Bradley Kitzul
Bradley Kitzul 2020년 12월 25일
댓글: Walter Roberson 2020년 12월 25일
Hi,
error: Unrecognized function or variable 'genCand'.
Error in Main (line 40)
cn1=genCand(:,1:1000-NO+1);
"
I keep getting this error and I am unsure why as I have a function named "genCand" in another script. I am just calling it in my main code.
Sorry if my question is rudimentary, I am new to this.
Thank you for your help guys!

채택된 답변

J Chen
J Chen 2020년 12월 25일
You need to put the genCand function in a file named genCand.m (in the same directory of the calling m-file or in the search path).
  댓글 수: 2
Bradley Kitzul
Bradley Kitzul 2020년 12월 25일
I have them all saved in a folder on my desktop. Their function names are the same as it is saved in the folder. I am very confused on what is wrong.
Walter Roberson
Walter Roberson 2020년 12월 25일
is the folder on your MATLAB path? See pathtool

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by