[Top][All Lists]

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

Re: round() in oct file?

From: John W. Eaton
Subject: Re: round() in oct file?
Date: Mon, 12 Feb 2007 03:53:40 -0500

On 12-Feb-2007, Michael Creel wrote:

| Well, I'd like to element-by-element round all values in a matrix, without 
| looping. Since the octave matrix class is involved, I think that this might 
| the place to ask. Thanks, though. Michael

I think something like the following should work.

  Matrix m1 = ...;

  m1.apply (xround);  // Changes values in m1.

  Matrix m2 = (xround);  // Creates new matrix m2 with rounded vaues.

The xround function is declared/defined in lo-mappers.{h,cc}.


reply via email to

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