Can the script detect the version of MATLAB on which the script run?
5 views (last 30 days)
Show older comments
alpedhuez
on 13 Dec 2020
Commented: Walter Roberson
on 16 Dec 2020
I write a script that depends on a new feature of R2020b. But other people may not have R2020b. Is it possible to write such as
if (the version is R2020b)
run hello_R2020b.m
else if
run hell_R2020a.m
end
?
0 Comments
Accepted Answer
More Answers (1)
John D'Errico
on 13 Dec 2020
Edited: John D'Errico
on 13 Dec 2020
WTP?
A = ver('matlab')
A =
struct with fields:
Name: 'MATLAB'
Version: '9.9'
Release: '(R2020b)'
Date: '29-Jul-2020'
Why you think you need to use run, I cannot imagine, but whatever floats your boat.
0 Comments
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!