|
|
| File Information |
| Description |
vernum - returns the current version of Matlab as a number
30 June 2006 - Created
by David S. Ciochetto and Audrey Barnett, Dalhousie Oceanography
30 June 2006 (Last modified) by David S. Ciochetto
This function gets the current version of matlab and converts it to a real number through the first decimal point. It is intended to be used to delimit cases where code is specific to particular Matlab versions. It is particularly useful for < or > a specific version such as when someone writes to you and says hey, this does not work for Matlab 3... you can use vernum in your code to add a patch with case or if statements to write code that works for the older versions.
It is intended to make detection of the version automatic in your code so it keeps the users of your scripts happy since they do not need to go in and fix the code for their specific version.
Example
if vernum < 7.1 % The below works for Matlab versions earlier than 7.1
% Add code
else % works for newer code
% Add fancy code here
end |
| Acknowledgements |
This submission has inspired the following:
getversion: find MATLAB version number as a double
|
| MATLAB release |
MATLAB 7.0.1 (R14SP1)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (7) |
| 30 Jun 2006 |
Jos x
|
|
|
| 01 Jul 2006 |
kristjan jonasson
|
|
|
| 05 Jul 2006 |
B L
|
|
|
| 05 Jul 2006 |
Sergei Koptenko
|
|
|
| 22 Jul 2006 |
AnonToYou Hah
|
|
|
| 01 Nov 2007 |
Tim Davis
|
|
|
| 12 Apr 2010 |
Jan Simon
|
|
|
| Updates |
| 30 Jun 2006 |
Add a ';' to prevent unwanted output to screen. |
|
Contact us at files@mathworks.com