Hello,
Le 08/04/2017 à 04:47, [email protected] a écrit :
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?
x = -2:0.1:2;
pw = [1 2 3 4];
[X,P] = ndgrid(x, pw);
clf
plot(x, X.^P)
xtitle("Power laws","x")
legend(msprintf("$x^%d$\n",pw'),4)
HTH
Samuel
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users