[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Selecting data from a matrix using a mask
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: Selecting data from a matrix using a mask |
Date: |
Wed, 25 May 2011 11:31:44 -0500 |
On 25 May 2011 09:43, samsetch <address@hidden> wrote:
> Hello I am new to Octave but am trying to use it as a tool to analyze paired
> matrices that are created as an output from a MetriPol microscope system.
>
> The output given is two 1024x1360 matricies, one containing vales from
> 0-180 (angles) the other 0-0.8 (sindelta)
>
> The idea is to create a mask from the angle data with a threshold of say 100
> degrees. I then aim to lables the points less than 100 degrees as 1 the rest
> 0's. I then want to use this mask to analyze the sindelta matrix and pick
> out the points that relate to these 1's.
If I understand correctly, you can do this:
threshold = 100;
idx = x > threshold;
y(idx) = 0;
or slightly more compactly
y(x>100) = 0;
HTH,
- Jordi G. H.