help-octave
[Top][All Lists]
Advanced

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

Re: printing errors in octave/matlab


From: Miquel Cabanas
Subject: Re: printing errors in octave/matlab
Date: Mon, 15 Mar 2004 19:05:47 +0100
User-agent: Mutt/1.3.28i

hello,

On Mon, Mar 15, 2004 at 05:34:27PM +0100, Bart Vandewoestyne wrote:
> 
> I'm trying to convert some Octave code to also run on Matlab, and I came
> across lots of the following statements:
> 
>       error("Write your favorite error here\n");
> 
> When trying to run this on Matlab, i get:
> 
>       "Missing variable or function."
> 
> What would be the most appropriate way of changing the Octave code so it
> also runs on Matlab?

I would say it's an error() to post M's questions to an O's list,
and that rather you should ask it at an M's forum... nonetheless,

if you check the M's help for M's error() function you will notice
that it uses single quotes instead of double quotes. Since O will
understand and indulge on single quotes use them on your O's code
that should also run on M's... though it's a bit non-sense to use
single quotes for both transposing matrices and quoting text when
you can use single quotes for a single task and double quotes for
something else.

Alternatively you could try using if (M) run M's code, elseif (0)
run O's code, but that's overkilling for this purpose.

Miquel


-- 
Miquel E Cabanas ------------------------------------------------------
SeRMN, Universitat Autonoma de Barcelona (address@hidden)
------------------------------------------o-oo--ooo---ooo--oo-o--------



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

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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