我是靠谱客的博主 苗条哈密瓜,这篇文章主要介绍如何在MATLAB里面画星座图,如何用MATLab画OQPSK星座?,现在分享给大家,希望可以做个参考。

看看这个程序是否符合你的要求:按下鼠标左键开始绘制一个星座图,点击右键结束当前星座

function xingzuo

figure('WindowButtonDownFcn',@wbdcb)

ah = axes('DrawMode','fast');

axis ([1 10 1 10])

title('绘制星座图')

color1='brcmkgy';

num=1;

function wbdcb(src,evnt)

if strcmp(get(src,'SelectionType'),'normal')

set(src,'pointer','circle')

cp = get(ah,'CurrentPoint');

xinit = cp(1,1);yinit = cp(1,2);

hl = line('XData',xinit,'YData',yinit,。

。。

'Marker','p','color',color1(num));

set(src,'WindowButtonMotionFcn',@wbmcb)

set(src,'WindowButtonUpFcn',@wbucb)

end

function wbmcb(src,evnt)

cp = get(ah,'CurrentPoint');

xdat = [xinit,cp(1,1)];

ydat = [yinit,cp(1,2)];

set(hl,'XData',xdat,'YData',ydat);drawnow

end

function wbucb(src,evnt)

if strcmp(get(src,'SelectionType'),'alt')

num=num+1;

if num>7

num=1;

end

set(src,'Pointer','arrow')

set(src,'WindowButtonMotionFcn','')

set(src,'WindowButtonUpFcn','')

else

return

end

end

end

end。

全部

最后

以上就是苗条哈密瓜最近收集整理的关于如何在MATLAB里面画星座图,如何用MATLab画OQPSK星座?的全部内容,更多相关如何在MATLAB里面画星座图内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(67)

评论列表共有 0 条评论

立即
投稿
返回
顶部