Thread Subject: Timer and Too many input arguments error

Subject: Timer and Too many input arguments error

From: Daniel

Date: 13 Dec, 2008 06:00:20

Message: 1 of 4

Hello,

I am creating a timer using:

HB_TIMER = timer('ExecutionMode','fixedSpacing','BusyMode','drop','Period',4,'TasksToExecute',1,'ExecutionMode','fixedRate');
set(HB_TIMER, 'TimerFcn', {@UpdateTuningCurveHB});

But I keep getting the following error.

??? Error while evaluating TimerFcn for timer 'timer-16'

Error using ==> UpdateTuningCurveHB
Too many input arguments.

There are no input arguments for the function UpdateTuningCurveHB.

What's going on? I can not find any documentation on this. I think I am calling it correctly.

Any help is greatly appreciated!

Thanks,
-Dan

Subject: Timer and Too many input arguments error

From: Walter Roberson

Date: 13 Dec, 2008 16:14:03

Message: 2 of 4

Daniel wrote:
 
> HB_TIMER = timer('ExecutionMode','fixedSpacing','BusyMode','drop','Period',4,'TasksToExecute',1,'ExecutionMode','fixedRate');
> set(HB_TIMER, 'TimerFcn', {@UpdateTuningCurveHB});
 
> But I keep getting the following error.
 
> ??? Error while evaluating TimerFcn for timer 'timer-16'
 
> Error using ==> UpdateTuningCurveHB
> Too many input arguments.
 
> There are no input arguments for the function UpdateTuningCurveHB.

Timer functions use the usual callback calling sequence -- that is, it is always passed
at least two arguments, "source" and "event".

--
.signature note: I am now avoiding replying to unclear or ambiguous postings.
Please review questions before posting them. Be specific. Use examples of what you mean,
of what you don't mean. Specify boundary conditions, and data classes and value
relationships -- what if we scrambled your data or used -Inf, NaN, or complex(rand,rand)?

Subject: Timer and Too many input arguments error

From: Daniel

Date: 13 Dec, 2008 23:16:02

Message: 3 of 4

Walter Roberson <roberson@hushmail.com> wrote in message
>
> Timer functions use the usual callback calling sequence -- that is, it is always passed
> at least two arguments, "source" and "event".
>

What would be the proper way to call this then? I am fairly new to matlab and I am still trying to get my bearings.

Thank you for your help!

-Dan

Subject: Timer and Too many input arguments error

From: Daniel

Date: 14 Dec, 2008 03:02:01

Message: 4 of 4

I have figured this out. Thank you for your hint.

-Dan

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
timer Daniel 13 Dec, 2008 01:05:03
rssFeed for this Thread

Contact us at files@mathworks.com