It was an otherwise quiet morning here at Pick Of The Week Towers when I started getting messages from around MathWorks all saying the same thing "Mike! Look at this great new entry on File Exchange, this HAS to be Pick Of The Week this week."
So I took a look....and I love it.
makeBanner renders any string as a comment-block banner in your code, using manually designed ASCII-style characters. Like this
makeBanner('Pick of the week!','big')
%—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
% ██████╗ ██╗ ██████╗██╗ ██╗ ██████╗ ███████╗ ████████╗██╗ ██╗███████╗ ██╗ ██╗███████╗███████╗██╗ ██╗ ██╗
% ██╔══██╗██║██╔════╝██║ ██╔╝ ██╔═══██╗██╔════╝ ╚══██╔══╝██║ ██║██╔════╝ ██║ ██║██╔════╝██╔════╝██║ ██╔╝ ██║
% ██████╔╝██║██║ █████╔╝ ██║ ██║█████╗ ██║ ███████║███████╗ ██║ █ ██║███████╗███████╗█████╔╝ ██║
% ██╔═══╝ ██║██║ ██╔═██╗ ██║ ██║██╔══╝ ██║ ██╔══██║██╔════╝ ██║ ███ ██║██╔════╝██╔════╝██╔═██╗ ╚═╝
% ██║ ██║╚██████╗██║ ██╗ ╚██████╔╝██║ ██║ ██║ ██║███████╗ ███╔═╗██║ ███████╗███████╗██║ ██╗ ██╗
% ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝ ╚══╝ ╚══╝ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═╝
%—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
or this
makeBanner('MATLAB','mini')
%———————————————————————————
% ╔╗╔╗ ╔═╗ ═╦═ ╓ ╔═╗ ╔═╮
% ║╚╝║ ╠═╣ ║ ║ ╠═╣ ╠═╣
% ╜ ╜ ╜ ╜ ╜ ╚══ ╜ ╜ ╚═╯
%———————————————————————————
Copy and paste the results into your MATLAB script as part of the comments section and you are set. This is Eli's first contribution to File Exchange so join me in thanking him for his contribution and welcoming him into the community.
댓글
댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.