早教吧 育儿知识 作业答案 考试题库 百科 知识分享

我想把s设定在某个范围之内,如果超出就用最大最小界来替代某个变量!以下这些代码不知道有没错?functions=simplebounds(s,Lb,Ub)%Applythelowerboundvectornstmp=s;I=nstmpUb;nstmp(J)=Ub(J);%Updatethisnewmove

题目详情
我想把s设定在某个范围之内,如果超出就用最大最小界来替代某个变量!以下这些代码不知道有没错?
function s=simplebounds(s,Lb,Ub)
% Apply the lower bound vector
ns_tmp=s;
I=ns_tmpUb;
ns_tmp(J)=Ub(J);
% Update this new move
s=ns_tmp;
▼优质解答
答案和解析
不懂, 没有用过这种语言. 这是什么语言呢?
看了我想把s设定在某个范围之内,如...的网友还看了以下: