<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Le 05/12/2019 à 14:25, Federico Miyara
      a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:84d6acff-5438-9330-d566-c9b54850f487@fceia.unr.edu.ar">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <br>
      Dear all,<br>
      <br>
      When using makecell such as in<br>
      <br>
      <font face="Courier New">--> u = makecell([2 2], cos, 'hello',
        1+%s^2, [1 2; 3 4])<br>
         u  = <br>
        <br>
          [  1 fptr      ]  [1x1 string  ]<br>
          [1x1 polynomial]  [2x2 constant]<br>
        <br>
        we get a cell array where the unidimensional ordering of the
        cells goes first along columns and then ows. However, when
        extracting components unidimensionally, it behaves the other way
        around:<br>
        <br>
        --> u(1:4)<br>
         ans  =<br>
        <br>
          [  1 fptr      ]<br>
          [1x1 polynomial]<br>
          [1x1 string    ]<br>
          [2x2 constant  ]<br>
        <br>
        The same happens wen applying matrix:<br>
        <br>
        --> matrix(u,4,1)<br>
         ans  =<br>
        <br>
          [  1 fptr      ]<br>
          [1x1 polynomial]<br>
          [1x1 string    ]<br>
          [2x2 constant  ]<br>
        <br>
        --> matrix(u,1,4)<br>
         ans  =<br>
        <br>
          [1 fptr]  [1x1 polynomial]  [1x1 string]  [2x2 constant]<br>
        <br>
        Isn't this inconsistent?<br>
        Shouldn't makecell create the cell array going along rows and
        then columns? <br>
      </font></blockquote>
    <p><br>
    </p>
    You are right, Federico.<br>
    We could have expected to list cells elements in linearized indices
    order, as for all other native Scilab arrays.<br>
    <p>This irregularity/exception is completely useless and misleading:</p>
    <font size="-1"><tt>--> c = { "abcd" %T ; %pi %z}</tt><br>
      <tt> c  = </tt><br>
      <tt>  [1x1 string  ]  [1x1 boolean   ]</tt></font><font size="-1"><tt><br>
          [1x1 constant]  [1x1 polynomial]</tt></font><font size="-1"><tt><br>
        <br>
        --> makecell([2 2], c{:}(:))</tt><tt><br>
      </tt><tt> ans  =</tt><tt><br>
      </tt><tt>  [1x1 string ]  [1x1 constant  ]</tt><tt><br>
      </tt><tt>  [1x1 boolean]  [1x1 polynomial]</tt></font><br>
    <p>The fact that it is documented does not attenuate it.<br>
      <br>
      Please do not hesitate to report a wish about removing this
      exception.<br>
      It would not be complicated to remove it, and tracking and
      updating it in existing codes would be easy, through the <i>makecell</i>
      keyword.<br>
      <br>
      Regards<br>
      Samuel<br>
      <br>
    </p>
  </body>
</html>