注册 登录
编程论坛 Matlab

Matlab中switch语句编写 求助

q为23nice 发布于 2013-05-23 22:03, 806 次点击
function [Fx] = F(t0,t1,F0,F1,t)  
%F Summary of this function goes here
%   Detailed explanation goes here
switch (t)
    case (t<t1&&t>=t0)
        Fx=F0+((F1-F0)/(t1-t0))*(t-t0);
    case (t>=t1)
        Fx=0;
    otherwise
        disp('error')
end
本人是初学者,哪位大神帮忙看看我那错了?
3 回复
#2
wp2319572013-05-23 22:11
#3
q为23nice2013-05-24 09:19
回复 2楼 wp231957
请问,什么意思?
#4
cuirun2013-05-27 11:51
为什么不用if??
1