Plot a circle of desired intensity.
2 ビュー (過去 30 日間)
古いコメントを表示
I have the following code to draw a white square on a black background. The intensity of the square can be varied from 0 to 256 from black to white.
backg = uint8(zeros(500,500,3));%produce 500x500 px background
for x = 200:1:300; %define x limits of square
for y = 200:1:300; %define y limits of square
backg(x,y,:) = 256; %choose intensity
end;
end;
image(backg);
I would like to use the same code to plot a circle, but I get errors related to array indices.
Many thanks.
採用された回答
Image Analyst
2020 年 6 月 12 日
Code is in the FAQ: https://matlab.fandom.com/wiki/FAQ#How_do_I_create_a_circle.3F
Adapt as needed (center location, radius, intensity, etc.).
2 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Orange についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!