help-octave
[Top][All Lists]
Advanced

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

Re: memory exhausted


From: Dirk Laurie
Subject: Re: memory exhausted
Date: Wed, 29 Jul 1998 08:13:23 +0200 (SAT)

A. Scottedward Hodel wrote:
> 
> Thanks, but it's not equivalent if you have widely varying coefficients...
> Which I do.  (from 1e-5 to 1e+7, balancing inappropriate in this appl. for
> non-numerical reasons.).
> 
> ----------
> >From: Guido Dietz <address@hidden>
> >Date: Tue, Jul 28, 1998, 2:43 PM
> 
> >On 28-Jul-98 A. Scottedward Hodel wrote:
> >> I ran the following code on 1 172x172 matrix:
> >> 
> >># truncate acd to 6 digits of precision...
> >> for ii=1:rows(acd)
> >>   for jj = 1:columns(acd)
> >>     eval(["acd(ii,jj) = ",sprintf("%12.6E",acd(ii,jj));]);
> >>   endfor
> >> endfor
> >What about:
> >acd=round(acd*1e6)/1e6;
> >Should a) work and b) be faster ...
> >
If the only purpose of that computation is to simulate floating-point
with lower precision, then

  acd=acd.*(1+1e-6*(rand(size(acd)-0.5)))

also does the trick.  

Dirk



reply via email to

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