-
Notifications
You must be signed in to change notification settings - Fork 0
/
msgBox.m
38 lines (33 loc) · 1.32 KB
/
msgBox.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
%-------------------------------------------------------------------------%
%------------------------------Notations----------------------------------%
%-------------------------------------------------------------------------%
%
% This is a function to create a custom message box.
% Usage:
% 1. 'msgBox(enter_str_here)' ;or
% 2. Change the message content by uncommenting the line below the %Display
% and enter string.
% Customization:
% - Change the message box's position and size constants in the %Const.
% - Change the message box's visual presentation in the %Properties.
% *NOTE: highly reuseable code.
%-------------------------------------------------------------------------%
%--------------------------------msgBOX-----------------------------------%
%-------------------------------------------------------------------------%
%
function[] = msgBox(str)
%Display:
%str="Enter_a_string_here"; %message
%Consts:
hor=400; %horizontal shift
ver=440; %vertical shift
leng=160; %box's length
wid=55; %box's width
%Properties
h = msgbox(str); %message box function
ah = get( h, 'CurrentAxes' );
ch = get( ah, 'Children' );
set(h, 'position', [hor ver leng wid]); %box position and size
set(ch, 'FontSize', 18); %font size
set(ch, 'FontName', 'Times New Roman'); %font type
end%msgBOX