Selecting Some Members from a Matrix in MATLAB
<p>Let's assume: </p>

<pre><code>R = [1     2     3; ...
     4     5     6; ...
     7     8     9; ...
     ];
</code></pre>

<p>How I can pick* only three members from it: <code>R(1,1)</code> , <code>R(1,3)</code> and <code>R(3,3)</code></p>

<p>It means I am looking for</p>

<pre><code> B =
     1
     7 
     9 
</code></pre>

<p>Please bear in mind that <code>B = [R(1,1), R(1,3), R(3,3)]</code> or "loop" solution is not the answer as I need to do it for a large data. So, preferably using indexing solution. Thanks </p>

<ul>
<li>The rule (condition) for picking the member is:
<code>R(i,j)</code> that <code>i = [ 1, 3, 3]</code> and <code>j = [1 , 1 , 3]</code>; </li>
</ul>