changeCbMapOutput sets the output format for drawCbMap. Displays outputFormat if no inputs provided. outputFormatOK = changeCbMapOutput(outputFormat) OPTIONAL INPUT outputFormat drawCbMap render format {'svg', 'matlab', 'java'} (java not implemented) OUTPUT outputFormatOK True if output format set properly, else false.
0001 function outputFormatOK = changeCbMapOutput(outputFormat) 0002 %changeCbMapOutput sets the output format for drawCbMap. Displays 0003 %outputFormat if no inputs provided. 0004 % 0005 % outputFormatOK = changeCbMapOutput(outputFormat) 0006 % 0007 %OPTIONAL INPUT 0008 % outputFormat drawCbMap render format 0009 % {'svg', 'matlab', 'java'} (java not implemented) 0010 %OUTPUT 0011 % outputFormatOK True if output format set properly, else false. 0012 % 0013 % 0014 0015 global CB_MAP_OUTPUT 0016 0017 %% List output format if no inputs 0018 if nargin <1 0019 outputFormatOK = 0; 0020 fprintf('CB map output set to : %s\n',CB_MAP_OUTPUT); 0021 return; 0022 end 0023 0024 %% List supported output here 0025 supportedOutput = {'matlab','svg'}; 0026 0027 %% Set CB_MAP_OUTPUT if outputFormat is supported 0028 if any(strcmpi(outputFormat,supportedOutput)) 0029 CB_MAP_OUTPUT = outputFormat; 0030 outputFormatOK = 1; 0031 else 0032 warning([outputFormat ' is not a supported render format.']); 0033 outputFormatOK = 0; 0034 end