資源簡介
matlab腳本文件,一個簡單的滑模控制算法。其中包含該控制的必須的函數,代碼較小,適合初學者。

代碼片段和文件信息
function?pos?=?mypos(i)
%?mypos.m???????????給定figure對象個數求解合適的擺放位置向量以防止圖片堆疊
%?i?????????????????figure個數
%?pos?=?mypos(i)????求出i個figure對象的合理位置向量,其中pos是元胞數組,使用規范(已生成figure對象后):set(gcf‘position‘pos{i})
%?hu?2018-6-11
if?i?>?8
????disp(‘too?many?figure!?The?maximum?number?is?8‘)
end
scr?????=?get(0‘screensize‘);
figs????=?[400300];%default?size?560*420
for?k?=?1:i
????if?k?<=?4
????????pos{k}?=?[scr(1)?+?(k?-?1)?*?figs(1)scr(2)?+?scr(4)?/?2figs];
????end
????if?k?>?4
????????pos{k}?=?[scr(1)?+?(k?-?5)?*?scr(3)?/?4scr(2)?+?30figs];
????end
end
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????638??2018-06-14?16:11??mypos.m
?????文件???????1354??2018-06-28?22:42??Robotsimu_sm.m
?????文件????????433??2018-06-14?16:15??sat.m
-----------?---------??----------?-----??----
?????????????????2425????????????????????3
- 上一篇:通信原理QAM調制和星座圖
- 下一篇:ct重建matlab代碼
評論
共有 條評論