close
Blogtrottr
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中 
Eventbrite makes it happen

Create an event and sell tickets online through Eventbrite. It's simple! Sign up and get started today.
From our sponsors
MATLAB的colormap顏色問題
May 22nd 2014, 03:07

r=15;
x0=S1(1,1);
y0=S1(1,2);

t=linspace(0, 2*pi, 360);
x=x0+r*cos(t);
y=y0+r*sin(t);
plot(x,y,'black');
hold on;
plot(x0,y0,'.');

hold on;
for m=1:1:584 %這裡是畫出每一點的顏色
x1=S(m,1);
y1=S(m,2);
if(S3(m)>0)
ccc=([0,0,1]*S3(m)+[1,0,0]*(60-S3(m)))/60;
else
ccc=([0,1,0]*(-S3(m))+[1,0,0]*(S3(m)+60))/60;
end
plot(x1,y1,'s','Color',ccc);
hold on;
end
des_color=[];
for m=0:0.01:1 %這FOR迴圈不分就是在讓顏色從綠色區間跑到紅色區間在跑道藍色區間
if(m>0.5)
des_color=[des_color;(2-2*m),0,2*m-1];
else
des_color=[des_color;2*m,1-2*m,0];
end
end
colormap(des_color);
clev=[-60:1:60];
colorbar;
caxis([clev(1) clev(end)]);

可是最後plot出來的color bar是全黑的 不知道問題出在哪裡
數量降低到128個的話,color bar是正常的從負值綠色到中間紅色再到正值藍色

This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 奇摩商城 的頭像
    奇摩商城

    瑪法達2014星座運勢大預言, 2014星座運勢大預言星星王子, 2014星座運勢大預言 唐立淇, 唐立淇2014星座運勢大預言, 薇薇安2014星座運勢大預言

    奇摩商城 發表在 痞客邦 留言(0) 人氣()