figureScreenSize.m 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. %% Author: Rodrigo de Barros Vimieiro
  2. % Date: April, 2018
  3. % rodrigo.vimieiro@gmail.com
  4. % =========================================================================
  5. %{
  6. %
  7. % DESCRIPTION:
  8. % Create a figure of 80% of sreen size.
  9. %
  10. % ---------------------------------------------------------------------
  11. % Copyright (C) <2018> <Rodrigo de Barros Vimieiro>
  12. %
  13. % This program is free software: you can redistribute it and/or modify
  14. % it under the terms of the GNU General Public License as published by
  15. % the Free Software Foundation, either version 3 of the License, or
  16. % (at your option) any later version.
  17. %
  18. % This program is distributed in the hope that it will be useful,
  19. % but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. % GNU General Public License for more details.
  22. %
  23. % You should have received a copy of the GNU General Public License
  24. % along with this program. If not, see <http://www.gnu.org/licenses/>.
  25. %
  26. %}
  27. % =========================================================================
  28. %% Create a figure
  29. function figureScreenSize()
  30. screen_size = get(0,'Screensize');
  31. w = screen_size(3);
  32. h = screen_size(4);
  33. fw = round(w*0.8);
  34. fh = round(h*0.8);
  35. fig_opt = [(w-fw)/2 (h-fh)/2 fw fh];
  36. figure("Name", 'Animation', NumberTitle='off', Position=fig_opt)
  37. end