Syntax
v=verML([name])
Input Parameter
Output Parameter
v : | | RElease such as 'R2017a'; empty if missing; |
Examples
ver
verML('Matlab')
verML('Matlabasasdasd')
verML('Mapping Toolbox')
Copyright 2017-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This function, verML
, is designed to return the release version of a specified MATLAB tool or toolbox. It is a more straightforward alternative to the built-in ver
function.
Input Parameters
- name: The name of the tool or toolbox to search for. If not provided, it defaults to 'Matlab'.
Output Results
- v: The release version of the specified tool, such as 'R2017a'. If the tool is not found, it returns an empty value.
Algorithm Steps
- The function begins by retrieving the input parameter
name
using getfuncparams
. If no name is provided, it defaults to 'Matlab'.
- If the
name
is 'Matlab', the function retrieves the MATLAB version using the version
function.
- It extracts the release information from the version string, starting from 'R20' and removes any trailing parenthesis.
- If the version string does not contain 'Update', it appends 'Released' to the version string.
- If the
name
is not 'Matlab', the function retrieves the list of all installed toolboxes using the ver
function.
- It iterates through the list of toolboxes to find a match with the specified
name
.
- If a match is found, it extracts the release version from the toolbox information and returns it.
- If no match is found, the function returns an empty value.
Example Usage
verML('Matlab')
: Returns the release version of MATLAB.
verML('Mapping Toolbox')
: Returns the release version of the Mapping Toolbox if installed.
verML('Matlabasasdasd')
: Returns an empty value as the tool is not found.
Algorithm explaination created using ChatGPT on 2025-08-19 00:35. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21