执行出错:Error:File:C:\MATLAB7\work\sta.m Line:4 Column:32 Incomplete or misformed expresfunction snext = sta(a)switch acase 0:snext=4case 1:snext=1case 2:snext=1case 3:snext=2otherwise:snext=1end 保存为sta.m文件然后在matlab中调用sta
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/08 09:19:24
执行出错:Error:File:C:\MATLAB7\work\sta.m Line:4 Column:32 Incomplete or misformed expresfunction snext = sta(a)switch acase 0:snext=4case 1:snext=1case 2:snext=1case 3:snext=2otherwise:snext=1end 保存为sta.m文件然后在matlab中调用sta
执行出错:Error:File:C:\MATLAB7\work\sta.m Line:4 Column:32 Incomplete or misformed expres
function snext = sta(a)
switch a
case 0:
snext=4
case 1:
snext=1
case 2:
snext=1
case 3:
snext=2
otherwise:
snext=1
end
保存为sta.m文件
然后在matlab中调用sta(1)
执行出错:
Error:File:C:\MATLAB7\work\sta.m Line:4 Column:32
Incomplete or misformed expression or statement.
什么原因啊?
执行出错:Error:File:C:\MATLAB7\work\sta.m Line:4 Column:32 Incomplete or misformed expresfunction snext = sta(a)switch acase 0:snext=4case 1:snext=1case 2:snext=1case 3:snext=2otherwise:snext=1end 保存为sta.m文件然后在matlab中调用sta
function snext = sta(a)
switch a
case 0
snext=4
case 1
snext=1
case 2
snext=1
case 3
snext=2
otherwise
snext=1
end