xiaoyaoxianshi
2010-01-29, 05:02
我找了个程序,用rose function 做relative frequency circular histogram. 但是,在这个程序基础上,我还想把满足一定relative frequency的bin填上颜色。如果能根据不同relative frequency填上不同的颜色,就更好了。但是,写了个程序,只能把颜色全部填满,不能根据relative frequency的不同来填充颜色。需要高人指点。谢谢啦!:)
theta = 2*pi*rand(1,50);
nbins = 30;
[tout,rout] = rose(beta,nbins);
relativefreq = rout/length(beta);
figure(3)
polar(tout,relativefreq);
[xout,yout]=pol2cart(tout, relativefreq);
set(gca,'nextplot','add');
fill(xout,yout,'g')
theta = 2*pi*rand(1,50);
nbins = 30;
[tout,rout] = rose(beta,nbins);
relativefreq = rout/length(beta);
figure(3)
polar(tout,relativefreq);
[xout,yout]=pol2cart(tout, relativefreq);
set(gca,'nextplot','add');
fill(xout,yout,'g')