Get data from table to editfield

조회 수: 1 (최근 30일)
Kavinprasad M
Kavinprasad M 2022년 11월 9일
답변: RAGHUNATHRAJU DASHARATHA 2022년 11월 11일
i have created an app where i get the data from a table & display in GUI, i need to get the minimum value/ last value from the table into an editfield, table consists of three rows, i want minimum value data from second & third column, kindly support in this regard
[file,path] = uigetfile('*.xlsx');
app.t = readtable(fullfile(path,file));
app.UITable.Data = app.t;
app.t = app.UITable.Data;
app.t.Properties.VariableNames(1) = "Time";
app.t.Properties.VariableNames(2) = "Angle RH";
app.t.Properties.VariableNames(3) = "Angle LH";
app.UITable.ColumnName = app.t.Properties.VariableNames;
app.x = table2array(app.t(:,"Time"));
app.y = table2array(app.t(:,"Angle RH"));
app.y1 = table2array(app.t(:,"Angle LH"));
ResultData = plot(app.UIAxes3,app.x,app.y,app.x,app.y1);
app.RHRemainingAngleEditField.Value = AAA;
app.LHRemainingAngleEditField.Value = AAA;

답변 (1개)

RAGHUNATHRAJU DASHARATHA
RAGHUNATHRAJU DASHARATHA 2022년 11월 11일
As per my understanding you want to get minimum value from 2nd and 3rd column of your data.
I assume you have converted your table of data to array where app.y and app.y1 are second and third columns of your data.
To get minimum value from those columns you can use min function. To know more refer this documentation link.

카테고리

Help CenterFile Exchange에서 NetCDF에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by