Faster way for find some value in matrix with matlab
<p>I have a matrix and I am trying to find where i getting a value. so, i am using <code>find(x==y)</code>for making vectors with the values, for example:</p>

<pre><code>n11=find(x==11)
n4=find(x==4)
n8=find(x==8)
</code></pre>

<p>And n11, n4, n8 are not of the same length.  </p>

<p>Sometimes, i have to do this like 20 or 30 times for 20 or 30 different values of x, so if for example i want to get an interval of x∈[1991,2015] <code>find(x==1991) to find(x==2015)</code> how can i get those values faster without doing</p>

<pre><code>find(x==1991)
.
.
.
find(x==2015)
</code></pre>

<p>thank you </p>