欢迎来到天天文库
浏览记录
ID:33741423
大小:95.07 KB
页数:4页
时间:2019-02-28
《matlabcompass罗盘函数的用法》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、Matlabcompass函数用法MATLABFunctionReferencecompassPlotarrowsemanatingfromtheorigin画从原点发出的箭头Syntax语法•compass(X,Y)•compass(Z)•compass(…,LineSpec)•h=compass(…)其中xxz都是在笛卡尔直角坐标系中的坐标点,箭头是画在一个圆形的网格里。用法一:compass(X,Y)displaysacompassplothavingnarrows,wherenisthenumberofelementsinXorY.Thelocat
2、ionofthebaseofeacharrowistheorigin.Thelocationofthetipofeacharrowisapointrelativetothebaseanddeterminedby[X(i),Y(i)].X,Y都有一维数组,数组长度都为n,则compass(X,Y)会画出一组从原点出发,指向(x(i),y(i))的箭头,且箭头终点在(x(i),y(i))・当然x,y分别为一个数时,只画一个箭头。Eg:»compass(2,2)300270X=[l1-1-1];Y=
3、011-1
4、;»compass(X,Y)12060303302
5、40300270用法二compass(Z)displaysacompassplothavingnarrows,wherenisthenumberofelementsin乙Thelocationofthebaseofeacharrowistheorigin.Thelocationofthetipofeacharrowisrelativetothebaseasdeterminedbytherealandimaginarycomponentsof乙Thissyntaxisequivalenttocompass(real(Z)Jmag(Z)).当z是复数时,坐标终
6、点横坐标为其实部,纵坐标为其虚部Eg:»a=l+2*ja二1.0+2.0000i»compass(a)120902.5602a150:/30r180/0210330240300270用法三:compass(…,LineSpec)drawsacompassplotusingthelinetype,markersymbol,andcolorspecifiedbyLineSpec.可以用Line的特性参数LineSpec.来设置compass的性质。可以设置的参数有线得类型,符号,颜色SpecifierLineStyle■solidline(default)—d
7、ashedline•dottedlinedash-dotlineLineStyleSpecifiersSpecifierlarkerType+plussign0circle拿asterisk•pointXcrossssquareddiamondupwardpointingtriangleVdownwardpointingtriangle>rightpointingtriangle8、sSpecifierColorrredggreenbblueccyanmagentayyellowkblack■whiteColorSpecifiersEg:»compass(a/r,):10330240300270»compass(a/+f)50;1012060240210530030330270»compass(l,2/—')12030150330210240300
8、sSpecifierColorrredggreenbblueccyanmagentayyellowkblack■whiteColorSpecifiersEg:»compass(a/r,):10330240300270»compass(a/+f)50;1012060240210530030330270»compass(l,2/—')12030150330210240300
此文档下载收益归作者所有