필터 지우기
필터 지우기

Display the output in a Edit Field Text box in App-Designer

조회 수: 22 (최근 30일)
Avratanu Biswas
Avratanu Biswas 2019년 3월 30일
댓글: Avratanu Biswas 2019년 4월 1일
for instance ,
[h,p,ci,stats] = ttest2(x,y)
The above outputs, need to be displayed in a text box . (app designer )
Any help will be apprecited. Thanks in advance .

채택된 답변

Cris LaPierre
Cris LaPierre 2019년 4월 1일
Text fields only works for h and p.
load examgrades
x = grades(:,1);
y = grades(:,2);
[h,p,ci,stats] = ttest2(x,y);
app.hEditField.Value = h;
app.pEditField.Value = p;
Because ci is a vector, you'd have to use a table.
app.UITable.Data = ci;
Because stats is a structure, you'd have to either use a text field for each of the 3 fields or a table.
app.tstatEditField.Value = stats.tstat;
app.dfEditField.Value = stats.df;
app.sdEditField.Value = stats.sd;
or
app.UITable_2.Data = {stats.tstat,stats.df, stats.sd};
Since you need a table anyway, why not consider putting all the data into a single table? Everything should be a single row, so something like this:
app.UITable_3.Data = {h,p,ci(1),ci(2),stats.tstat,stats.df, stats.sd};
uitable.png

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by