Truncating Decimal points of an array

I have imported some data into matlab that contains an accuracy that
is way too high for me to accurately search for a specific value
inside that variable.

For example, I am trying to find certain points in the datastring and
figuring out in what position it is inside the array. (I am searching
for ~23, data in the array is 23.0040209243929292 thus it cannot find

Is there a way to truncate the values down to a certain accuracy (say
4 decimal points?)

Strread seems to do what I want, but only for a string and not an
imported array.



Relevant Pages

  • Re: mXCreateNumericArray (Crashing program)
    ... > from matlab it crashes with "Out of memory. ... > just a 2D array and it still gives the same error.. ... > Below is my fortran file which i compile from matlab with mex cmsl4Interated. ... That way when the mex file returns MATLAB knows that there is nothing in those arrays. ...
  • Re: Absolute beginner vs. fuzzy logic
    ... into B) is readily available in MatLab. ... new +1-dimensional array. ... The graph showed how a certain mechanical system ... > each iteration. ...
  • Re: zero based arrays?
    ... array, even in Matlab, its just that Matlab is an interpreted ... Every programming language has things it does differently from every other ... first) element of the array. ... case you'll be writing in C or C++ and so you'll use the native indexing ...
  • Re: need help on building a "Next" button in GUI
    ... I am a new user of MatLab. ... When I selected the pictures, they did form an array FileName(), but my next_callback did not work at all. ... % hObject handle to figure ... function varargout = Image_OutputFcn ...
  • new to FFTW - I have some questions
    ... I am new to using the FFTW algorithms in C++, ... I have used matlab for ... For example, the array might consist of 40 trials, ... optimal algorithm based on the size of the FFT alone? ...