我正在用scilab绘制编码器的数据,为了使用绘制的数据,我必须提取数据,我一直在寻找,但没有任何有用的东西。
在看了Matlab中的过程后,我发现了一个特定的类比:以下是从scilab中提取数据的代码.你首先要在绘图窗口中选择该绘图为当前绘图。
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
下面的方法对我来说很有效。
只需选择当前绘图,并从命令提示符中获取它的句柄。
h = gca();
然后获取多边形的句柄:
p = h. children;
最后得到图形句柄,如下所示:
c = p.children;
打印绘图数据。
c. data