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

歡迎光臨散文網(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ó)家法律
云和县| 江永县| 句容市| 和田县| 洮南市| 霍邱县| 汤阴县| 宣威市| 敦化市| 贵州省| 德兴市| 宁乡县| 洛南县| 武宣县| 芷江| 徐水县| 英超| 翁源县| 加查县| 孟津县| 石林| 利辛县| 台安县| 荣成市| 沁阳市| 平邑县| 六盘水市| 巢湖市| 闻喜县| 托克托县| 嵊州市| 雷波县| 资溪县| 米脂县| 嘉峪关市| 昭通市| 贵溪市| 盐亭县| 泽州县| 福海县| 满洲里市|