i cant plot to UIAxes
3 ビュー (過去 30 日間)
古いコメントを表示
Hello i have been working on my project but currently i have been stuck on this problem where i cant plot to my UIAxes using my GUI program (app designer) here is my code :
(function 1)
rawdata = uigetfile('*.mat','Select the MATLAB code files', 'MultiSelect', 'on');
varlist = who('-file',rawdata);
app.ListBox.Items = varlist(1);
setappdata(0,'onedata',varlist);
in this function i should upload my .mat file in so i can plot in UIAxes in function 2 :
value = app.StateButton.Value;
x=getappdata(0,'onedata');
plot(app.UIAxes,x);
but each time it tells me
Error using plot
Invalid first data argument.
please help.
2 件のコメント
採用された回答
Greg
2018 年 3 月 31 日
x=getappdata(0,'onedata');
Gives you the cell array output from the call to who. You can't plot that in any axes.
2 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File 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!