help-octave
[Top][All Lists]
Advanced

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

Re: Error with Catch ME continue


From: Markus Mützel
Subject: Re: Error with Catch ME continue
Date: Wed, 23 Oct 2019 09:44:55 +0200

Am 23. Oktober 2019 um 08:38 Uhr schrieb "Farzad Torabi" :
> Hi All
> 
> I have a part of my Matlab code written with 
> 
>     catch ME
>         warning('found error in %dth file', i);
>         fprintf('Error: %s\n', ME.message);
>         continue
> 
> but in Octave I get this error :
> 
> error: octave_base_value::int64_scalar_value(): wrong type argument 'complex 
> scalar'
> error: called from
>     MyCode at line 414 column 9
 
Have you checked that "i" is defined in this context? If not, it defaults to 
the imaginary unit for complex numbers.
I'd advice to avoid using "i" and use a different variable name (maybe "iLoop").

Markus




reply via email to

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