Can the script detect the version of MATLAB on which the script run?

3 次查看(过去 30 天)
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
?

采纳的回答

Walter Roberson
Walter Roberson 2020-12-13
  5 个评论

请先登录,再进行评论。

更多回答(1 个)

John D'Errico
John D'Errico 2020-12-13
编辑:John D'Errico 2020-12-13
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.

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by