フィルターのクリア

Putting data into in GUI table

30 ビュー (過去 30 日間)
Adam
Adam 2011 年 10 月 26 日
回答済み: MITAKSHI NIMJE 2019 年 9 月 19 日
I have been building a GUI using GUIDE in MatLab, and in that GUI i have a table. In the first column of the table i want 10 samples of voltage values, and in the second column i want the time and date, the voltage was measured.
So i have a cell array containing my voltages samples in the first cell, and the time and date in the second cell. The time is a string in the format 'dd-mm HH:MM:SS.
my code:
x= handles.MinVolt{1} %10 sample voltages
y= handles.MinVolt{2} %10 time samples in string format 'dd-mm HH:MM:SS'
colnames = {'Voltage','Time'};
with this line i can put the voltage samples in the firs column
set(handles.MaxMin_Table,'data',x,'ColumnName',colnames)
How can i put the time samples in the second column of the table?

回答 (5 件)

Jayesh Kavathe
Jayesh Kavathe 2011 年 10 月 26 日
This response wont help you but what the * coincidence. Right now I have a GUI Table question drafted with exactly same title. Weird. Need to change the title now :)

Fangjun Jiang
Fangjun Jiang 2011 年 10 月 26 日
You combine the data first and then set the data for the tabel.
Data=[x,y];
set(handles.MaxMin_Table,'data',Data,'ColumnName',colnames);
or directly
set(handles.MaxMin_Table,'data',[x,y],'ColumnName',colnames);
  2 件のコメント
Adam
Adam 2011 年 10 月 27 日
I am getting this error when i try your stuff:
CAT arguments dimensions are not consistent.
Error in ==> GUI>MaxMin_Table_CellEditCallback at 408
set(handles.MaxMin_Table,'data',[x,y],'ColumnName',colnames)
Fangjun Jiang
Fangjun Jiang 2011 年 10 月 27 日
Looks like x and y are not the same size. You need to make sure of it first. The point of the answer is that you set the complete data of the uitable, not set the data column by column.

サインインしてコメントする。


upasana singh
upasana singh 2017 年 12 月 2 日
I want to connect my GUI with dataset folder , so please anyone tell me how I can do this

Ka Mirul
Ka Mirul 2018 年 11 月 25 日
I found the solution step by step : here
"Filling GUI Table Data [MATLAB GUI Tutorial"

MITAKSHI NIMJE
MITAKSHI NIMJE 2019 年 9 月 19 日
I have a .xls file. I want to process data row wise in matlab gui.Can somebody help me.
for eg-
parameters given are date, time, height,volume, etc.
if i want to display average of the given parameters from date-21/6/19 time 0.30 to 21/6/19 ,8.00.

カテゴリ

Help Center および File ExchangeString Parsing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by