GUI axes from simulink

3 ビュー (過去 30 日間)
Krystian Wiewiór
Krystian Wiewiór 2019 年 5 月 24 日
Hello,
With all respect I have read some topics about GUI, getting data from simulink. I have an issue with getting data from simulink and write the code and maybe some additional codes in AppDesigner code. I try to make easy example like "Step -> Sine -> Out(Scope)". I know about function (get_param('GUIsinus','Scope'); -> get_param(Object,Parameter)) Where and what should I add to launch data from simulink?
This is my code:
classdef app1 < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
UIFigure matlab.ui.Figure
UIAxes matlab.ui.control.UIAxes
end
% App initialization and construction
methods (Access = private)
% Create UIFigure and components
function createComponents(app)
% Create UIFigure
app.UIFigure = uifigure;
app.UIFigure.Position = [100 100 640 480];
app.UIFigure.Name = 'UI Figure';
% Create UIAxes
app.UIAxes = uiaxes(app.UIFigure);
title(app.UIAxes, 'Title')
xlabel(app.UIAxes, 'X')
ylabel(app.UIAxes, 'Y')
app.UIAxes.Position = [63 232 300 185];
end
end
methods (Access = public)
% Construct app
function app = app1
% Create and configure components
createComponents(app)
% Register the app with App Designer
registerApp(app, app.UIFigure)
if nargout == 0
clear app
end
end
% Code that executes before app deletion
function delete(app)
% Delete UIFigure when app is deleted
delete(app.UIFigure)
end
end
end

回答 (0 件)

カテゴリ

Help Center および File ExchangePrepare Model Inputs and Outputs についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by