[Top][All Lists]

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


From: Helgi Tomasson
Subject: switch/case
Date: Thu, 31 Aug 2000 11:48:31 +0000

What is the current status on the switch case .  In the enclosed program

octave -2.0.16 does not like that method can be either a 6 characer
or an 8 character thing.  If I add two blanks, i.e.

method='linear  '

and similarly in the case statement thing seem OK.

function  method(method,...)

switch method;
case  'linear';
     disp ('method is linear');
case 'bilinear';
     disp ('method is bilinear');

In Matlab I think the following should work

switch method;
  case {'linear','quasi-linear'};
    disp ('method is linear or quasi-linear'};
  case 'bilinear';
     disp ('method is bilinear');

sincerely yours

Helgi Tomasson

Helgi Tomasson                                       FAX:  354-552-6806
University of Iceland                                PHONE:354-525-4571
Faculty of Economics and Business Administration     email:address@hidden
Oddi v/ Sturlugotu
IS-101 Reykjavik

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]