Plot circle with radius r and roughness amplitude e

19 ビュー (過去 30 日間)
pramod pal
pramod pal 2020 年 5 月 17 日
回答済み: Ameer Hamza 2020 年 5 月 17 日
How to model or plot circular cross-section of radius (r) with roughness of amplitude (e) on the circumference.

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 5 月 17 日
Try this
r = 1; % radius
e = 0.15;
theta = linspace(0, 2*pi, 100);
R = r*ones(size(theta)) + (rand(size(theta))-0.5).*e/2;
x = R.*cos(theta);
y = R.*sin(theta);
plot(x, y, '.-');
axis([-r-0.5 r+0.5 -r-0.5 r+0.5])

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDescriptive Statistics and Visualization についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by