<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hello,<br>
      <br>
      Le 08/04/2017 à 04:47, <a class="moz-txt-link-abbreviated" href="mailto:scilab.20.browseruk@xoxy.net">scilab.20.browseruk@xoxy.net</a> a écrit :<br>
    </div>
    <blockquote
      cite="mid:DE684673B49.00000A3Ascilab.20.browseruk@xoxy.net"
      type="cite">
      <pre wrap="">Hi,

I want to do the equivalent of 

    plot( xdata, xdata .^ 2, xdata .^ 3, xdata '^ 4, ... );

and benefit from the plot() color rotation, without having to repeat the equation.

In Perl I might do (something like):

    plot( xdata, map xdata .^ $_, 2 .. 5 );

Something like that in SciLab?
</pre>
    </blockquote>
    <br>
    <tt>x = -2:0.1:2;</tt><tt><br>
      pw = </tt><tt>[1 2 3 4];<br>
    </tt><tt>[X,P] = ndgrid(x, pw);</tt><tt><br>
    </tt><tt>clf<br>
      plot(x, X.^P)</tt><tt><br>
      <br>
      xtitle("Power laws","x")<br>
      legend(msprintf("$x^%d$\n",pw'),4)<br>
    </tt><img src="cid:part1.4C6D148C.34C2E4E8@free.fr" alt=""><br>
    HTH<br>
    Samuel<br>
    <br>
  </body>
</html>