[Scilab-users] Filled polygons from polylines

Antoine Monmayrant antoine.monmayrant at laas.fr
Wed Apr 14 14:34:09 CEST 2021


On 14/04/2021 14:21, arctica1963 wrote:
> Sorry, I did not make it clear.
>
> Instead of the following which updates the existing graphic to generate the
> final plot (y1 to y10);
>
> plot(-[t(n) t], [0 y1])
> plot(-[t(n) t], [0 y2])
> plot(-[t(n) t], [0 y3])
> plot(-[t(n) t], [0 y4])
> plot(-[t(n) t], [0 y5])
> plot(-[t(n) t], [0 y6])
> plot(-[t(n) t], [0 y7])
> plot(-[t(n) t], [0 y8])
> plot(-[t(n) t], [0 y9])
> plot(-[t(n) t], [0 y10])
>
> Can a loop (y) be made to simplify the above for clarity as a single plot
> command? Not a big issue but would be good to know.

Sure:

plot(-[t(n) t], [[0 y1];[0 y2];[0 y3];[0 y4];[0 y5];[0 y6];[0 y7];[0 y8];[0 y9];[0 y10]])

Antoine

>
> Lester
>
>
>
> --
> Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>



More information about the users mailing list