資源簡介
matlab開發-Kilobotswarm控制Matlabarduino。控制千鳥群,將物體推過迷宮。蜂群被最亮的光吸引

代碼片段和文件信息
function?[?angle?]?=?AngleFix(?angle??threshold)
%?ANGLEFIX?takes?an?angle?and?makes?it?an?equivalent?in?between?a?threshold?
%??????????in?which?on?the?the?stated?threshold?is?both?the?positive?and?
%??????????neagtive?threshold.?
%???ANGLEFIX(anglethreshold)
%
%???????x?=?an?angle?you?would?like?to?change
%???????threshold?=?the?edge?values?wanted?for?angles
%
%???????if?threshold?=?pi/2?or?90?then?the?angle?created?will?be?under?the
%???????assumption?that?you?have?a?half?circle?and?the?negative?version?of??
%???????an?angle?is?the?same?as?the?positive?version?of?an?angle
%???????
%???????if?threshold?=?pi?or?180?then?the?angle?created?will?be?under?the
%???????assumption?that?you?have?a?full?circle?and?the?negative?version?of??
%???????an?angle?is?not?the?same?as?the?positive?version?of?an?angle
????while?(angle?>?threshold||angle<=?-threshold)
????????if?angle>threshold
????????????angle=angle?-?2*threshold;
????????elseif?angle?<=?-threshold
????????????angle=angle?+?2*threshold;
????????end
????end?
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????1029??2016-08-12?18:31??AngleFix.m
?????文件?????????346??2016-08-12?18:31??circle.m
?????文件?????????303??2016-08-12?18:31??dist2points.m
?????文件????????1272??2016-08-12?18:31??FlowForce.m
?????文件??????150286??2016-08-12?18:31??KilobotTableExample.jpeg
?????文件?????????296??2016-08-12?18:31??__MACOSX\._KilobotTableExample.jpeg
?????文件?????????549??2016-08-12?18:31??MazeMap.mat
?????文件????????4930??2016-08-12?18:31??MDPgridworldFunction.m
?????文件?????????120??2016-08-12?18:31??__MACOSX\._MDPgridworldFunction.m
?????文件???????13493??2016-08-12?18:31??ob
?????文件?????????120??2016-08-12?18:31??__MACOSX\._ob
?????文件????????3969??2016-08-12?18:31??plot_gaussian_ellipsoid.m
?????文件????????8862??2016-08-12?18:31??RegionCode.m
?????文件?????????120??2016-08-12?18:31??__MACOSX\._RegionCode.m
?????文件????????3903??2016-08-12?18:31??RelayOn.m
?????文件?????????120??2016-08-12?18:31??__MACOSX\._RelayOn.m
?????文件????????1601??2016-08-12?18:31??license.txt
- 上一篇:matlab開發-簡單音頻播放
- 下一篇:matlab開發-最大最小特征值組合
評論
共有 條評論