GUI axes from simulink

조회 수: 2 (최근 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 CenterFile Exchange에서 Develop uifigure-Based Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by