Plot circle with radius r and roughness amplitude e

21 visualizaciones (últimos 30 días)
pramod pal
pramod pal el 17 de Mayo de 2020
Respondida: Ameer Hamza el 17 de Mayo de 2020
How to model or plot circular cross-section of radius (r) with roughness of amplitude (e) on the circumference.

Respuesta aceptada

Ameer Hamza
Ameer Hamza el 17 de Mayo de 2020
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])

Más respuestas (0)

Categorías

Más información sobre Descriptive Statistics and Visualization en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by