Unrecognized function or variable

1 Ansicht (letzte 30 Tage)
Bradley Kitzul
Bradley Kitzul am 25 Dez. 2020
Kommentiert: Walter Roberson am 25 Dez. 2020
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!

Akzeptierte Antwort

J Chen
J Chen am 25 Dez. 2020
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 Kommentare
Bradley Kitzul
Bradley Kitzul am 25 Dez. 2020
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 am 25 Dez. 2020
is the folder on your MATLAB path? See pathtool

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Entering Commands finden Sie in Help Center und File Exchange

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by