help-octave
[Top][All Lists]
Advanced

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

Re: index precision issues


From: Robert A. Macy
Subject: Re: index precision issues
Date: Tue, 26 Apr 2005 16:10:24 -0700

Try subtracting 1000. from your result and then print it
out using scientific notation.  You'll find a residual
value.  

           - Robert -

On Wed, 27 Apr 2005 00:34:19 +0200
 Joan Picanyol i Puig <address@hidden> wrote:
> * Hall, Benjamin <address@hidden> [20050426
> 20:29]:
> > How about using round to force octave to recognize your
> step size as an
> > integer, e.g.:
> > 
> > >>> lsnapshots = ps (:, 1:round(model.dts /
> model.dt):__end__)
>  
> I want to protect myself from this (although I'm aware
> that fractional
> oversampling factors are common).
> 
> > When I try to use selected samples from my long vector
> I get:
> > 
> > error: expecting integer index, found 1001.000000
> > error: in
>
/usr/home/joan/wd/simulacions--mainline--0.6--current/rx_signal.m
> > near line 33, column 20:
> > 
> > >>> lsnapshots = ps (:, 1:model.dts / model.dt:__end__)
> 
> What is wrong in this indexing approach?
> 
> > 
> > keyboard: stopped in
> >
>
/usr/home/joan/wd/simulacions--mainline--0.6--current/one_drop.m
> at line 33
> > debug> disp(size(ps))
> >         3  1000000
> > debug> disp(model.dts/model.dt)
> > 1000.0
> 
> This is unexplainable to me: octave complains about
> 1001.000000 not
> being and integer index, but tells me that that value was
> 1000.0
> instead?
> 
> tks
> -- 
> pica
> 



-------------------------------------------------------------
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]