Getting Pop-up menu output as Excel sheet for plotting
2 ビュー (過去 30 日間)
古いコメントを表示
hi everyone,
i am creating a gui which will help to compare the data from two selected sheets of excel file via plotting, excel file consist of various sheets. i am using one pusbutton for importing the excel file and two popup menu button for selection of two desired sheets of excel file and finally one axes to plot the data. my problem is that when i select a particular sheet from popup menu its not getting selected as file.
3 件のコメント
採用された回答
Geoff Hayes
2019 年 5 月 19 日
Varun - I don't understand this line of code
data111=xlsread(handles.popupmenuX,' data11')
Why are you using the handle of the popupmenu (X) as the file name? In your initial code post, you are using a filename field from the handles structure. Why the change? Also, why are you putting data11 in quotes? (Again this differs from your initial code post...)
6 件のコメント
Walter Roberson
2019 年 5 月 21 日
I suspect that your
a=data1(:,19);
is not in the same function that
plot(handles.axes1, a,b,'r',a,c,'g',a,d,'b','MarkerSize',10)
is in.
Also, your code
[~, Sheets2]=xlsfinfo(handles.filename)
set(hObject,'String',Sheets2)
index_selected = get(hObject, 'Value')
sheet_list=get(hObject, 'String')
selectedsheet=sheet_list{index_selected}
gets the names of the sheets from xlsinfo, sends it to the the popup string list, and then immediately without giving any time to draw the control or for the user to choose something, asks which value the user chose.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Import from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!