<html>
  <head>
    <meta content="text/html; charset=ISO-2022-JP"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#330000">
    Hi<br>
    <br>
    why don't you just <br>
    <pre wrap="">y(ii(1)) ?</pre>
    <br>
    On 07/11/2011 02:43, Iai Masafumi ax wrote:
    <blockquote cite="mid:4EB737B5.9050407@axelspace.com" type="cite">
      <pre wrap="">Hi,

Could anyone tell me if, in the codes below, there is any way to make
"y(II(1))" work without error, just like "y(ii)"? I wanted to access a
part of a matrix by using an entry of a cell. I think it is a pretty
intuitive way of using a cell.

//--------------------------
y=[100:110]
ii=[1 3 5 7];
jj=[2 4 6 8];
y(ii)   // OK. This is an ordinary way.

II=cell(2,1);
II.entries(1)=ii;
II.entries(2)=jj;

II(1)
y(II(1)) // <-- ERROR

y(II.entries(1)) // OK. But not as concise as I see the benefit of using
cells.
//--------------------------



Thanks,
Iai
</pre>
    </blockquote>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      Adrien Vogt-Schilb (Cired) <br>
      Tel: (+33) 1 43 94 <b>73 77</b></div>
  </body>
</html>