%
% Associate the figure with the block, and set the figure's UserData.
%
SetSfunXYFigure(block,FigHandle);
set(FigHandle,'HandleVisibility','callback','UserData',ud);
%
% the figure doesn't exist, create one
%
screenLoc = get(0,'ScreenSize');
if screenLoc(1) < 0
left = -screenLoc(1) + 100;
else
left = 100;
end
if screenLoc(2) < 0
bottom = -screenLoc(2) + 100;
else
bottom = 100;
end
FigHandle = figure('Units', 'pixel',...
'Position', [left bottom 400300],...
'Name', BlockFigureTitle(block),...
'Tag', 'SIMULINK_XYGRAPH_FIGURE',...
'NumberTitle', 'off',...
'IntegerHandle', 'off',...
'Toolbar', 'none',...
'Menubar', 'none',...
'DeleteFcn', 'sfunxy([],[],[],''DeleteFigure'')');
%
% store the block's handle in the figure's UserData
%
ud.Block=block;
%
% create various objects in the figure
%
ud.XYAxes = axes;
ud.XYLine = plot(0,0,'EraseMode','None');
ud.XYLine1 = plot(ud.XYAxes,0,0,'EraseMode','None');
ud.XYXlabel = xlabel('X Axis');
ud.XYYlabel = ylabel('Y Axis');
ud.XYTitle = get(ud.XYAxes,'Title');
%
% Associate the figure with the block, and set the figure's UserData.
%
SetSfunXYFigure(block,FigHandle);
set(FigHandle,'HandleVisibility','callback','UserData',ud);
Verfasst am: 12.09.2011, 22:32
Titel: Also das mit dem Blockname habe ich noch weg bekommen
aber er mag es trotzdem nicht
da er wegen Invalid handle object Problme hat ich bin echt etwas ratlos...
Einstellungen und Berechtigungen
Du kannst Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen. Du kannst Dateien in diesem Forum posten Du kannst Dateien in diesem Forum herunterladen
MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.