java - 如何将记事本/电子表格中的数据集导入 Matlab GUI

标签 java javascript matlab

我是 Matlab 新手。我使用 matlab(R2009)。

我已经使用matlab创建了GUI,我想将数据集导入到创建的GUI表中。数据集包含分类值和数值。我尝试了多种方法,我可以将数据集导入为图形文件,并在该图中无法修改数据集。我还尝试了另一种方法并将数据集带入命令窗口。但我需要让数据集出现在我的 GUI 的表格中。

导入数据集后,我想将数据集中的每个变量添加到列表框中。通过单击列表框中的这些变量,它可以绘制图表、计算平均值等...

谢谢。

最佳答案

也许您可以先使用以下命令从表中导入数据

[a, b, c] = xlsread('MyTable.xls');

% and then create the table and set the data with
h = uitable; % or create it directly from the GUI design
set(h, 'data', [1 2 3]);

% or set the data from the readed excel
set(h, 'data', a);

[编辑]您可以从 matlab 运行 uitabledemo 来查看 uitable 的一些演示。

关于java - 如何将记事本/电子表格中的数据集导入 Matlab GUI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5350637/

相关文章:

javascript - 有什么办法可以干燥这段代码吗? + "toLowerCase()"

javascript - 如何使用javascript jquery关闭父div

matlab - MATLAB 中的高效低阶逼近

matlab - 使用通配符 MatLab 读取单个图像文件

java - 从java中的一行匹配多个关键字

java - 如何使用struts在一页加载两个数据表?

java - 当子类没有在 Java 中定义构造函数时会发生什么?

java - 使用integer.parseInt java时出现数字格式异常

javascript - 如何跟踪或调试所有可用的 JavaScript 事件

arrays - Matlab将元胞数组保存到文本文件