How do I display mean value of data in GUI using edit text if I have the formula

2 ビュー (過去 30 日間)
Chen Liang Teoh
Chen Liang Teoh 2021 年 11 月 29 日
回答済み: Rishabh Singh 2021 年 12 月 6 日
I want to display the mean of my selected data using the edit text in GUIDE using the formula handles.mean_data = mean(handles.data)

回答 (1 件)

Rishabh Singh
Rishabh Singh 2021 年 12 月 6 日
Hi,
If you already have loaded your data into the handles structure and handles.mean_data is the mean value.
Then in order to display it in the EditField, simply add to the callback function,
set(hObject, 'String', handles.mean_data);
If you are using MATLAB version greater than 2015b, I would recommend using App designer. It is more intuitive compared to GUIDE.
Hope this helps.

Community Treasure Hunt

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

Start Hunting!

Translated by