我是 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/