資源簡介
一種畫出雷達屏幕界面的Matlab源程序,可以通過輸入目標的距離,方位角。畫出與真實雷達界面類似的matlab界面
代碼片段和文件信息
function?radarplot(varargin)
??errText??=???‘RADARPLOT?requires?2?or?3?inputs...‘;
??if(nargin???2)
????error([‘Error:?Too?few?input?arguments.‘?errText]);
??elseif(nargin??>??3)
?????error([‘Error:?Too?many?input?arguments.‘?errText]);
??end
??speed??=??varargin{1};
??direction??=??varargin{2};
??if(nargin??==??3)
????stylePicker???=??varargin{3};
??else
????stylePicker???=??0;
??end
??
??if(~isvector(speed)?||?~isnumeric(speed))
????error([‘Error:?RADARPLOT?requires?the?input?parameter?DISTANCE?‘...?
??????‘to?be?a?numeric?vector...‘]);
??end
??if(~isvector(direction)?||?~isnumeric(direction))
????error([‘Error:?RADARPLOT?requires?the?input?parameter?DIRECTION?‘...?
??????‘to?be?a?numeric?vector...‘]);
??end
??
??if(length(speed)??~=??length(direction))
????e
評論
共有 條評論