namefig
Version 1.0.0 (2,03 KB) von
宏樹 長嶋
NAMEFIG Create or focus a figure with a specific name and set its properties.
% NAMEFIG Create or focus a figure with a specific name and set its properties.
%
% FIG = NAMEFIG(NAME) creates a new figure with the specified NAME if
% it does not already exist. If a figure with the specified NAME
% exists, it brings the figure to the front.
%
% FIG = NAMEFIG(NAME, 'PropertyName', PropertyValue, ...) sets the
% specified properties of the figure. If 'size' is specified as a
% property name, it sets the size of the figure window.
%
% Example:
% fig1 = namefig('MyFigure', 'size', [400 300]);
% fig2 = namefig('AnotherFigure', 'Color', 'r', 'NumberTitle', 'off');
%
% Inputs:
% NAME - A string specifying the name of the figure.
%
% Optional Property-Value Pairs:
% 'size' - A vector [width height] specifying the size of the figure window.
% Other - Any valid figure property name and its corresponding value.
%
% Outputs:
% FIG - The handle to the created or existing figure.
%
% Notes:
% - If 'size' is specified, it overrides the default size of the figure.
% - Other property-value pairs are applied to the figure using the SET function.
% - If an invalid property name is specified, a warning is displayed.
%
% See also FIGURE, SET, FINDOBJ.
Zitieren als
宏樹 長嶋 (2024). namefig (https://www.mathworks.com/matlabcentral/fileexchange/168211-namefig), MATLAB Central File Exchange. Abgerufen .
Kompatibilität der MATLAB-Version
Erstellt mit
R2024a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.0.0 |