[問題] fill填充顏色已回收

看板MATLAB作者 (哈囉rt)時間15年前 (2009/02/11 13:50), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
clear; clf; axis equal; for i = 1:1:20 x = rand(1)*200; y = rand(1)*200; width = rand(1)*50; height = rand(1)*50; hold on; t = linspace(0, 2*pi); xx = x - width*cos(t); yy = y - height*sin(t); fill(xx,yy,'b'); % 'b' 為藍色 <---20個圓圈的內部全為藍色 line(xx,yy,'LineWidth',round(rand*9)+1,'Color',[rand rand rand]); end 要怎麼寫fill的語法 20個圓圈才會不同顏色呀 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.118.207.35
文章代碼(AID): #19acSGvA (MATLAB)