0
votes

I am plotting data from an encoder with scilab.In order to use the plotted data i must extract it.I have been look with nothing usefull. Is there a known way for data extraction in scilab?

2
If you are plotting the data (with any of the plot functions) you already must have the data e.g. plot2d(x,y); so why and from where do you want to extract it? Please clarify your question and give a code example of your problem to be able to understand. - Attila

2 Answers

1
votes

After looking at how the process is done in Matlab ,i could found out a certain analogy: Here is the code to extract data from scilab .You have first to select the plot as a current plot in the plot window:

  e2=gca()//extract the current plot handler
  b2=e2.children//i don t know what is this is really
  b2.data(:,2)// data is a matrix containing X and Y ,in my case i want to extract Y
0
votes

The following works for me:

Just select the plot as current and get the handle of it from the command prompt:

h = gca();

And then retrieve polygon handle:

p = h.children;

Finally get the graph handle like the following:

c = p.children;

Print the plot data:

c.data