帮助中心帮助中心
确定当前 MATLAB 版本是否早于指定的 MATLAB 版本
自 R2020b 起. 建议替换 verLessThan.
verLessThan
tf = isMATLABReleaseOlderThan(release)
tf = isMATLABReleaseOlderThan(release,stage)
tf = isMATLABReleaseOlderThan(release,stage,update)
如果当前 MATLAB® 版本早于 release,则 tf = isMATLABReleaseOlderThan(release) 返回逻辑值 1 (true),否则返回逻辑值 0 (false)。
release
1
true
0
false
示例
如果当前 MATLAB 版本早于 release 的 stage,则 tf = isMATLABReleaseOlderThan(release,stage) 返回逻辑值 1 (true),否则返回逻辑值 0 (false)。
stage
如果当前 MATLAB 版本早于 release 的 stage 的指定 update 号,则 tf = isMATLABReleaseOlderThan(release,stage,update) 返回逻辑值 1 (true),否则返回逻辑值 0 (false)。
update
全部折叠
使用 isMATLABReleaseOlderThan 检查 MATLAB 的当前版本是否早于指定版本。
isMATLABReleaseOlderThan
使用 matlabRelease 显示 MATLAB 的当前版本。
matlabRelease
currentRelease = matlabRelease
currentRelease = matlabRelease with properties: Release: "R2020b" Stage: "release" Update: 0 Date: 09-Sept-2020
使用 isMATLABReleaseOlderThan 检查当前版本是否早于 "R2020a"。
"R2020a"
tf = isMATLABReleaseOlderThan("R2020a")
tf = logical 0
还可以检查当前版本是否早于给定的阶段或更新号。
tf = isMATLABReleaseOlderThan("R2021a","release")
tf = logical 1
tf = isMATLABReleaseOlderThan("R2020b","release",1)
MATLAB 发行版,指定为字符串标量或字符向量。release 必须与全名 MATLAB 发行版相匹配。例如,"R2020b" 是有效输入,但 "20b" 不是有效输入并会引发错误。
"R2020b"
"20b"
示例: tf = isMATLABReleaseOlderThan("R2020b")
tf = isMATLABReleaseOlderThan("R2020b")
"release"
"prerelease"
MATLAB 版本阶段,指定为 "release" 或 "prerelease"。
示例: tf = isMATLABReleaseOlderThan("R2020b","release")
tf = isMATLABReleaseOlderThan("R2020b","release")
MATLAB 版本更新号,指定为数值标量。
示例: tf = isMATLABReleaseOlderThan("R2020b","release",2)
tf = isMATLABReleaseOlderThan("R2020b","release",2)
在 R2020b 中推出
matlabRelease | version
version
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office