www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@mbcfoundation/@DCTManager/checkoutDCTLicense.m
function [available, errmsg] = checkoutDCTLicense(ShowDialog) %CHECKOUTDCTLICENSE Check out a DCT license % % [AVAIL, ERRMSG]= CHECKOUTDCTLICENSE() attempts to check out a DCT % license and returns true if this succeeded and false otherwise. ERRMSG % will be non-empty if AVAIL is false. % % [AVAIL, ERRMSG]= CHECKOUTDCTLICENSE(SHOWDIALOG) will display any error % in a dialog if the SHOWDIALOG flag is set to true. % Copyright 2006-2010 The MathWorks, Inc. [available, errmsg] = mbcCheckForToolbox('Parallel Computing Toolbox', ... 'distrib_computing_toolbox', 'distcomp', true); if ~available && nargin && ShowDialog h = errordlg(errmsg, 'Failed License Checkout', 'modal'); waitfor(h); end