- Get Screen Size: First, get the size of the screen using the get(0, 'Screensize') command.
- Set Figure Position: Before displaying the montage or saving the figures, set the figure's position to match the screen size:
Fullscreen animation files montage
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi all, I need to montage 5 subplot animation. I've tried but I need them in full screen. How can I make it in full screen? Thanks in advance
0 commentaires
Réponses (1)
Ayush Anand
le 24 Mai 2024
You can use the set function with the figure handle to adjust its Position property to fill the screen. Here's how you can do it:
% clc; % Clear the command window.
% close all; % Close all figures (except those of imtool.)
% imtool close all; % Close all imtool figures.
% clear; % Erase all existing variables.
% workspace; % Make sure the workspace panel is showing.
%
% mainfolder='/Users/mehtap/Documents/MATLAB/Rainbow';
% %Open the excel file
% filelist = dir(fullfile(mainfolder, '**', '*.xls')); %look in all immediate subfolders of folder.
% [fname,pname] = uigetfile('*.xls','LOAD EXCEL FILE');
% fullpath = fullfile(pname,fname);
% DAT = readtable(fullpath, 'VariableNamingRule', 'preserve' );
% Syllable = DAT{:,2};
% b=Syllable;
% b(ismember(Syllable, "[break]"))=[];
% nsyll = numel(b);
%
% %c=cell(nsyll,5);
% fileNames = cell(5,1);
%
%
% for k=1:5
%
% b=Syllable;
% b(ismember(Syllable, "[break]"))=[];
% idx=ismember(DAT.Syllable,'[break]');
% DAT(idx,:)=[];
%
% [fname2,pname2] = uigetfile('*.png','LOAD .png FILE');
% mainfolder2=sprintf('Movie Frames from Normal_M1_T%d_POD',k);
% if ~exist(mainfolder2, 'dir'); mkdir(mainfolder2); end
% fileFolder = fullfile(mainfolder,mainfolder2);
% dirOutput = dir(fullfile(fileFolder,'Frame *.png'));
% fileNames{k} = fullfile(pname2, string({dirOutput.name}));
% for l=1:nsyll
% d(k,l)=fileNames{k}(l);
% end
% % Set a break point here to check if the fileNames are correct
% %montage(fileNames{k}(:) ,'Size', [nsyll k]);
%
% % % show the first image of each subject
% % figure;
% %montage(fileNames{1}(1:5), 'Size', [1 5]);
% %
%
% end
screenSize = get(0, 'ScreenSize');
for l=1:nsyll
% word = b{l};
p = figure;
set(p, 'Position', screenSize); % Make the figure full screen
% montage(d(:,l),'Size', [1 5]);
% offset = 0;
% text(-30, 0+offset, (sprintf(b{l})), 'fontsize', 8, 'color', 'black', 'fontweight', 'bold')
% offset = offset + 55;
F = getframe(p);
RGB = frame2im(F);
% exportgraphics(p, ['frame/' (sprintf('%d%s', l, b{l})) '.jpeg'], 'Resolution', 300);
% close(p);
end
0 commentaires
Voir également
Catégories
En savoir plus sur Basic Display dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!