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 アカウントにサインインするか新しい MathWorks アカウントを作成します。