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:
struct passed as varargin

Subject: struct passed as varargin

From: Phil Freeman

Date: 26 Oct, 2004 11:53:52

Message: 1 of 4

Is there a restriction on using structs as varargs (is that a word?)?
 I am using R14, if that is useful info.

Here is the error message that I am getting (html tags stripped):
??? Function 'lt' is not defined for values of class 'struct'.

Error in ==> lt at 18 [varargout{1:nargout}] = builtin('lt',
varargin{:});

The stack of function calls is long, but the basic structure is this.

I have a function like foo(x,varargin). This is being called as
feval(handle,x,varargin) from within another fucntion. Handle is a
handle to the function foo (@foo). Varargin, in this case, is a
single struct object.

I couldn't find anything within the documentation that indicated that
varargs couldn't be structs, but the error seems to point to this.

Any thoughts?
Phil Freeman

Subject: struct passed as varargin

From: Phil Freeman

Date: 26 Oct, 2004 11:57:01

Message: 2 of 4

Phil Freeman wrote:
>
>
[a bunch of words]
>
> Any thoughts?
> Phil Freeman

Oops. I found the bug, something entirely different. My apologies
for the needless post.

Phil Freeman

Subject: struct passed as varargin

From: Mohamed

Date: 3 Jun, 2011 22:37:05

Message: 3 of 4

"Phil Freeman" <philip."theletterel".freeman@boeing.com> wrote in message <eeee382.0@webx.raydaftYaTP>...
> Phil Freeman wrote:
> >
> >
> [a bunch of words]
> >
> > Any thoughts?
> > Phil Freeman
>
> Oops. I found the bug, something entirely different. My apologies
> for the needless post.
>
> Phil Freeman
could you tell me what you found because I am having the same error

Subject: struct passed as varargin

From: Sadik

Date: 4 Jun, 2011 00:31:05

Message: 4 of 4

Hi Mohamed,

Could you specifically point out the problem you are experiencing?

Best.

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