Assigning a shape size to a shape with a given handle (MATLAB)

Is there a way to assign the outerposition property of a shape to a shape with a given handle?

For example, if I wanted to define a shape as shown in Figure 1, I would use:

 figure(1)
 imagesc(Arrayname) % I.e. any array

I can also change the shape properties using code:

figure('Name', 'Name of figure','NumberTitle','off','OuterPosition',[scrsz(1) scrsz(2) 700 700]);

Is there a property name that I can use to give the outerposition property the number shown in Figure 1?

The reason I'm asking about this is because I use a command called save2word (from MATLAB file sharing) to save some graphics from a function that I created in a text file, and I want to limit the number of digits I opened. how he does it.

The rest of the code I have is:

plottedloops = [1, 5:5:100]; % Specifies which loops I want to save


GetGeometry = getappdata(0, 'GeometryAtEachLoop') % Obtains a 4D array containing geometry information at each loop


NumSections = size(GetGeometry,4); %Defined by the fourth dimension of the 4D array

for j = 1:NumSections
    for  i = 1:plottedloops
    P = GetGeometry(:,:,i,j);

    TitleSize = 14;
    Fsize = 8;
    % Save Geometry

    scrsz = get(0,'ScreenSize'); %left, bottom, width height   


  figure('Name', 'Geometry at each loop','NumberTitle','off','OuterPosition',[scrsz(1) scrsz(2) 700 700]); This specifies the figure name, dims etc., but also means multiple figures are opened as the command runs.

% I have tried this, but it doesn't work:
% figure(0, 'OuterPosition',[scrsz(1) scrsz(2) 700 700]);

    imagesc(P), title('Geometry','FontSize', TitleSize), axis([0 100 0 100]);

    text(20,110,['Loop:',num2str(i)], 'FontSize', TitleSize); % Show loop in figure
    text(70,110,['Section:',num2str(j)], 'FontSize', TitleSize);% Show Section number in figure

    save2word('Geometry at each loop'); % Saves figure to a word file

end

end

thank

+5
source share
2

figH = figure;

set(figH,'OuterPosition',[scrsz(1),scrsz(2),700,700]);

, .

- , findall gcf, ( /) .

+3

/:

  • :

    for i = plottedloops
    

    , plottedloops , , i . , :

    for i = 1:someScalarValue
    

    1:someScalarValue .

  • , - , save2word, - , .. . :

    scrsz = get(0,'ScreenSize'); %left, bottom, width height   
    figure('Name', 'Geometry at each loop','NumberTitle','off',...
           'OuterPosition',[scrsz(1) scrsz(2) 700 700]);
    

    .

0

All Articles