does not plot the normal distribution. Writes Unrecognized function or variable 'O'. What is the reason?
1 回表示 (過去 30 日間)
古いコメントを表示
classdef app3 < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
UIFigure matlab.ui.Figure
Button_4 matlab.ui.control.Button
Button_3 matlab.ui.control.Button
Button_2 matlab.ui.control.StateButton
UITable matlab.ui.control.Table
Image matlab.ui.control.Image
Button matlab.ui.control.Button
UIAxes3 matlab.ui.control.UIAxes
UIAxes2 matlab.ui.control.UIAxes
UIAxes matlab.ui.control.UIAxes
end
% Callbacks that handle component events
methods (Access = private)
% Image clicked function: Image
function ImageClicked(app, event)
[filename,pathname]=uigetfile ({'*.txt'}, 'File Selector');
fullpath=strcat(pathname,filename);
x=readtable(fullpath);
app.UITable.Data=x;
app.UITable.ColumnName=x.Properties.VariableNames;
year=x(:,1);
lat=x(:,2);
lon=x(:,3);
app.O=x(:,4);
end
% Cell edit callback: UITable
function UITableCellEdit(app, event)
end
% Value changed function: Button_2
function Button_2ValueChanged(app, event)
histfit(app.UIAxes, table2array (app.O))
0 件のコメント
回答 (1 件)
Chris
2021 年 10 月 26 日
app.O is a property that needs to be declared in a properties block before it can be used.
Since it's not declared, an error is thrown when you try to assign or retrieve it.
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!