8/4/2023 0 Comments Matlab toolboxes checkNow I'll wait for a compiled version before testing it. A useful error message would've saved time trying to diagnose the problem. Unfortunately, it required the Image Processing Toolbox, which I currently lack. This question was prompted by trying to test a co-workers script early. Within my code, I'd like to check if the end-users have fsolve in their installation and if not, use fzero. I hoped for a list of the many toolboxes I have access to. Learn more about toolbox, check for license MATLAB I am writings some code that I wish to distribute open source. image_toolbox).įurthermore, when I ran license('inuse'), I only received the following: The somefunction may fail for many reasons, for example that you lack available licenses or that the toolbox is not installed on your system. 'Image Processing Toolbox') to product names (ie. A practical approach would be to start your code with a try somefunction catch statement, where somefunction is unique to the toolbox you need. Some quick searching revealed ver product or the license function with the 'test' argument may be useful, but I could not find a mapping of toolbox names (ie. How would one check for installed MATLAB toolboxes in a script/function? (checking toolbox versions would also be good!) This could provide a quick and useful error message when someone attempts to run a script without a required toolbox.Ī quick, albeit rough, solution that comes to mind is parsing the text output of the ver command. I know this is a pretty old question, but a really simple answer is actually in the question (parse the output of ver). Tf = all(ismember(requiredToolboxes,installedToolboxes)) īy the way, if you need to check for versions, verLessThan is your friend. Here's an older list of feature strings for various toolboxes taken from a now-defunct newsgroup thread (link is now dead): featureStr = ] = deal(v.Name) A better choice is the license function, which (as you pointed out) requires a unique "feature string" for each toolbox. It's possible to have a toolbox installed and no license to use it (or all the available licenses could be checked out by other users). One drawback to the ver function is that it only tells you what's installed, not what has an available license.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |