Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
??? Undefined function or variable

Subject: ??? Undefined function or variable

From: Lommen

Date: 10 Aug, 2010 14:07:04

Message: 1 of 6

I am going mad! I keep getting "??? Undefined function or variable" when I run the function calc_RSI.

I have used "dir" and "path" and the file exists in both?

Subject: ??? Undefined function or variable

From: dpb

Date: 10 Aug, 2010 14:09:38

Message: 2 of 6

Lommen wrote:
> I am going mad! I keep getting "??? Undefined function or variable"
> when I run the function calc_RSI.
>
> I have used "dir" and "path" and the file exists in both?

Case mismatch, perhaps??? ML is case-sensitive in matching variable and
function names.

--

Subject: ??? Undefined function or variable

From: Andy

Date: 10 Aug, 2010 14:15:05

Message: 3 of 6

"Lommen " <lomme028@math.umn.edu> wrote in message <i3rme8$n$1@fred.mathworks.com>...
> I am going mad! I keep getting "??? Undefined function or variable" when I run the function calc_RSI.
>
> I have used "dir" and "path" and the file exists in both?

Well, clearly the function or variable doesn't exist within the scope of the function. But we can't help you beyond repeating the error message back to you if you don't show us some code and tell us why you think the function or variable is defined at the time the code calls for it.

Subject: ??? Undefined function or variable

From: Sean

Date: 10 Aug, 2010 14:15:07

Message: 4 of 6

"Lommen " <lomme028@math.umn.edu> wrote in message <i3rme8$n$1@fred.mathworks.com>...
> I am going mad! I keep getting "??? Undefined function or variable" when I run the function calc_RSI.
>
> I have used "dir" and "path" and the file exists in both?

which calc_RSI

Or is it an error in the function? I.e. the function is missing a variable or has a bad function call.

Subject: ??? Undefined function or variable

From: ImageAnalyst

Date: 10 Aug, 2010 14:19:36

Message: 5 of 6

Set a breakpoint right before you call that function. Clear the
command window with the clc command. Then execute the function and
copy the entire contents of the command window and report it back here
in this newsgroup.

Subject: ??? Undefined function or variable

From: Lommen

Date: 10 Aug, 2010 14:56:20

Message: 6 of 6

It appears I had a file the same name as one of the MATLAB toolboxes and that was wreaking havoc.

Regards,
Leigh

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us