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:
why i m getting error...,?? Undefined function or variable

Subject: why i m getting error...,?? Undefined function or variable

From: Aman

Date: 8 Jul, 2010 12:03:06

Message: 1 of 3

?? Undefined function or variable 'Avg_Gk'.

Error in ==> myfunctions at 9
avg(i)=Avg_Gk;

please explain in detail.

Subject: why i m getting error...,?? Undefined function or variable

From: Faraz Afzal

Date: 8 Jul, 2010 12:19:04

Message: 2 of 3

"Aman " <am.amangupta@gmail.com> wrote in message <i14epp$oiq$1@fred.mathworks.com>...
> ?? Undefined function or variable 'Avg_Gk'.
>
> Error in ==> myfunctions at 9
> avg(i)=Avg_Gk;
>
> please explain in detail.

I would rather suggest you to PLEASE EXPLAIN IN DETAIL..

TO me it seems and is very obvious that you are assigning value of Avg_Gk to avg(i) in a loop and you are never computing Avg_Gk..

A glimpse into your code would be handy.

Regards,
Muhammad Faraz

Subject: why i m getting error...,?? Undefined function or variable

From: dpb

Date: 8 Jul, 2010 12:35:18

Message: 3 of 3

Aman wrote:
> ?? Undefined function or variable 'Avg_Gk'.
>
> Error in ==> myfunctions at 9
> avg(i)=Avg_Gk;
>
> please explain in detail.

You don't have any such function nor a variable of that name as the
error message says, at least _not_in_the_scope_of_ myfunctions()

It could be a typo/spelling error, maybe it exists in the top level
workspace but you didn't pass it, maybe...

What you intend/intended is not possible to see w/o more detail...

--

Tags for this Thread

No tags are associated with 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