<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p><br>
    </p>
    <p>What do you wan to achieve exactly?<br>
      As Stéphane pointed out, the sizes are not the same.<br>
      When you assign something like:</p>
    <p>A=B;</p>
    <p>You have two different situations:</p>
    <p>1) size(A)==size(B)<br>
      2) size(B)=[1,1]</p>
    <p>In the first case, you assign each element of B to each element
      of A. In the latter case (which corresponds to your commented
      line), B is just a scalar that gets assigned to each element of A.<br>
      <br>
      In the current situation, you are neither in case 1) nor in case
      2).<br>
      As you have size(NodesMatrix2(i,j+1))=[300,300] and
      size(resu(k))=[300,1], you might want to replicate resu(k) 300
      times and fill NodesMatrix2(i,j+1) with these 300 copies. If this
      what you want to do, here is the code:</p>
    <p>NodesMatrix2(i,j+1)=resu(k)*ones(1,300);</p>
    <p><br>
    </p>
    <p>By the way, why do you use "evstr(resu(k))" instead of "resu(k)"?</p>
    <p><br>
    </p>
    <p>Antoine<br>
    </p>
    <br>
    <div class="moz-cite-prefix">Le 01/06/2018 à 11:45, Stéphane
      Mottelet a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:b7d9f477-ca6d-564f-9d7e-c7dfe0515806@utc.fr">It cannot
      work since
      <br>
      <br>
      --> size(k)
      <br>
       ans  =
      <br>
      <br>
         300.   1.
      <br>
      <br>
      <br>
      --> length(i)*length(j)
      <br>
       ans  =
      <br>
      <br>
         90000.
      <br>
      <br>
      i.e. NodesMatrix2(i,j+1) has 90000 elements and resu(k) has 300
      <br>
      <br>
      S.
      <br>
      <br>
      Le 01/06/2018 à 11:07, Carrico, Paul a écrit :
      <br>
      <blockquote type="cite">
        <br>
        Dear all
        <br>
        <br>
        I’ve a submatrix issue on the following example, and I do not
        remember (or understand) why : how can I do this ?
        <br>
        <br>
        (the goal is to extract and to store within a matrix results
        from an Ascii file)
        <br>
        <br>
        Thanks for any help
        <br>
        <br>
        Paul
        <br>
        <br>
        ###############################################################
        <br>
        <br>
        mode(0)
        <br>
        <br>
        clearall
        <br>
        <br>
        StartNodeLine= 1;
        <br>
        <br>
        NumberOfNodes= 100;
        <br>
        <br>
        DimCoordinates= 3;
        <br>
        <br>
        resu= rand(1000,1);
        <br>
        <br>
        tic();
        <br>
        <br>
        NodesMatrix2= zeros(NumberOfNodes,DimCoordinates+1);
        <br>
        <br>
        i= [1 : NumberOfNodes]'; NodesMatrix2(i,1) =
        _evstr_(resu(StartNodeLine + (DimCoordinates+2)*(i-1)+2));
        <br>
        <br>
        i= [1 : NumberOfNodes]'.*.ones(1,DimCoordinates)';
        <br>
        <br>
        j= ones(1,NumberOfNodes)'.*.[1 : DimCoordinates]';
        <br>
        <br>
        k= StartNodeLine + (DimCoordinates+2)*(i-1)+3+j;
        <br>
        <br>
        a= _evstr_(resu(k));
        <br>
        <br>
        NodesMatrix2(i,j+1)= _evstr_(resu(k)); /// does not work/
        <br>
        <br>
        ///NodesMatrix2(i,j+1) = 1; // work(basic assignement)/
        <br>
        <br>
        Duration2= toc()
        <br>
        <br>
        */EXPORT CONTROL :
        <br>
        /**Cet email ne contient pas de données techniques
        <br>
        This email does not contain technical data*
        <br>
        <br>
        <br>
        <br>
        _______________________________________________
        <br>
        users mailing list
        <br>
        <a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
        <br>
<a class="moz-txt-link-freetext" href="https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users">https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users</a>
        <br>
      </blockquote>
      <br>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>