[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'varargin' problem

From: Aron Lentsch
Subject: 'varargin' problem
Date: Sun, 23 Feb 2003 16:05:24 -0600

Hi there,

I recently installed Octave version 2.1.44 and since 
then one of my "ancient" scripts doesn't work anymore.

I identiefied the problem to be related to 'varargin'.  
Up to version 2.1.34 of Octave everything worked well.

The problem is most simpley outlined by the following 
test script:


gap.A = 200;  
gap.B = 8;
gap.C = 'Gray';

## fields = struct_elements(gap)   #  works OK

test_sub( gap )

function  retval = test_sub(varargin)
  fields = struct_elements(varargin)

If the call 'struct_elements' is in the main program 
there is no problem. If however 'struct_elements' is 
called from the sub-routine I get the following 

>> test
error: struct_elements: wrong type argument `cell'
error: evaluating assignment expression near line 3, 
column 10
error: called from `test_sub' in file 
error: near line 9 of file 

I suppose this problem is a bug. Or do I do something
wrong? Is there a work-around?

Thanks for the help,


   | A r o n   L E N T S C H
   | 178, rue P. Vaillant Couturier
   | 94140 Alfortville   -   FRANCE
   | home:   address@hidden  |  +33-1-4353-2433
   | office: address@hidden  |  +33-1-6087-7324

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]