最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

實(shí)現(xiàn)邊界控制的函數(shù) via Matlab語(yǔ)言

2022-12-11 20:09 作者:__牛油果__  | 我要投稿

%% 實(shí)現(xiàn)邊界控制的函數(shù) via Matlab語(yǔ)言

Lb = [0 0 0 0];

Ub = [8 7 6 5];

s = [10 3 4 9];


%%方法一 apply bounds

s = max(Lb,s);

s = min(Ub,s);


%%方法二 apply bounds

temp=s;

I=temp<Lb; ? ? ? ? ? ? ? ?% I=1×4 logical

temp(I) = Lb(I);

J = temp > Ub; ? ? ? ? ? % J=1×4 logical

temp(J) = Ub(J);

% Update this new move

s = temp;


%%方法三?apply bounds

A=Bounds( s, Lb, Ub)

function s = Bounds( s, Lb, Ub )

?% Apply the lower bound vector

?temp = s;

?I = temp < Lb; ? ? ? ? ? ?% I=1×4 logical

?temp(I) = Lb(I);

? % Apply the upper bound vector

?J = temp > Ub; ? ? ? ? ? % J=1×4 logical

?temp(J) = Ub(J);

?% Update this new move

?s = temp;

end




實(shí)現(xiàn)邊界控制的函數(shù) via Matlab語(yǔ)言的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
孟州市| 乌兰县| 南部县| 兴化市| 安龙县| 鸡泽县| 淳安县| 定结县| 霍州市| 睢宁县| 宁阳县| 毕节市| 洛宁县| 自贡市| 安福县| 和平区| 道孚县| 新乡县| 鄄城县| 南城县| 宣化县| 南溪县| 敖汉旗| 城口县| 大庆市| 鹤庆县| 黄山市| 宣威市| 晋中市| 赤水市| 新巴尔虎左旗| 通海县| 光泽县| 尼木县| 巢湖市| 昭通市| 永年县| 江阴市| 汝南县| 鹿泉市| 进贤县|