Put workspace data into menu and prompt someone to select it

2 ビュー (過去 30 日間)
Azola Feni
Azola Feni 2020 年 11 月 14 日
回答済み: Monisha Nalluru 2020 年 11 月 17 日
How do I numeric prompt the user to select which data that must be displayed from an excel file?

採用された回答

Monisha Nalluru
Monisha Nalluru 2020 年 11 月 17 日
Inorder to prompt user to select data from excel sheet.
  • First load the data from excel sheet into workspace, inorder to achieve this use function like readtable, readmatrix, readcell
  • In order to prompt user to select data, use listdlg function which create a list selection dialogue box. listdlg function only takes strings so convert the numeric data into string format using string function
As an example
data=readtable('mydata.xlsx'); % contains date, day, temperature
% is you want user to select temperature then convert temperature values into string datatype
temperature = string(data.temperature);
[indx,tf] = listdlg('ListString',temperature); %prompts user to select data

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by