[Scilab-users] {EXT} Plotting graphs

Dang Ngoc Chan, Christophe Christophe.Dang at sidel.com
Tue Nov 8 13:15:40 CET 2016


Hello,

> De : users [mailto:users-bounces at lists.scilab.org] De la part de Godson Moses
> Envoyé : mardi 8 novembre 2016 07:06
>
> Please with a data set in Excel sheet
> how do I  export it to Scilab
> and also  select the columns and row I want  to plot
> neglecting the others.

The best is to have a look at :
https://help.scilab.org/docs/6.0.0/en_US/section_c76aa854271b0bbdb796e15512af62cf.html

If you have .xls files, you can use xls_open() and xls_read().

I personally always export a CSV from Excel, then use csvRead() in Siclab.
But mind that by default, Excel use a semi-colon as separator and not a comma,
therefore I use

myValues = csvRead(filename, ";", "double");

In any case, you get a matrix of values.
If you want to plot the nth column vs. the mth column, just use

X = myValues(:, m);

Y = myValues(:, n);

plot(X, Y);

HTH,

regards

--
Christophe Dang Ngoc Chan
Mechanical calculation engineer
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


More information about the users mailing list