does not plot the normal distribution. Writes Unrecognized function or variable 'O'. What is the reason?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Chris
le 26 Oct 2021
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 commentaires
Voir également
Catégories
En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!