[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: imaginary unit
From: |
Dmitri A. Sergatskov |
Subject: |
Re: imaginary unit |
Date: |
Thu, 27 Apr 2006 12:27:17 -0600 |
On 4/27/06, Przemek Klosowski <address@hidden> wrote:
> On 4/26/06, Przemek Klosowski <address@hidden> wrote:
> > Perhaps the use of predefined 'i' should elicit a warning?
>
> That would be a rather annoying warning. Octave is built with
>
> Agreed, of course; the ideal warning would only happen when you
> use 'i' as an imaginary unit---but of course Octave has no way
> of knowing your intentions. Perhaps warning should trigger when
> 'i' (et al) is changed _away_from_ the imaginary unit? That would
> only trigger once.
>
The mess is not limited to variables.
You can also overwrite thinks like rand:
octave:1> rand=3
rand = 3
octave:2> rand(10)
error: invalid vector index = 10
It can also bite you the other way -- you forgot to define
a variable "ss" (stands for "sum squares") and then do:
if (ss <1) disp ("Hi!") end if
with the following result:
usage: retsys = ss (a,b,c{,d,tsam,n,nz,stname,inname,outname,outlist})
error: evaluating if command near line 193, column 3
error: called from `ss' in file `/usr/share/octave/2.9.5/m/control/system/ss.m'
error: evaluating binary operator `<' near line 1, column 8
error: if: error evaluating conditional expression
error: evaluating if command near line 1, column 1
(this is an actual buglet in leasqr.m)
This is a mess, but I guess we have to live with this.
Dmitri.
--
Re: imaginary unit, Marek Szczypinski, 2006/04/27
Re: imaginary unit, Javier Arantegui, 2006/04/27
Re: imaginary unit, Robert A. Macy, 2006/04/27
Re: imaginary unit, Bill Denney, 2006/04/28