plot points in a different colour co ordinates

15 vues (au cours des 30 derniers jours)
Ergahani
Ergahani le 19 Fév 2013
x = randi([-35,165],[2000,1]);
x = x';
y = randi([-20,80],[2000,1]);
y = y';
plot(x,y,'kx','LineWidth',2,'MarkerSize',10)
I can also plot points with different colours within two circles.
num1 = 2000;
radius = 30;
theta = rand(1,num1)*(2*pi);
r = sqrt(rand(1,num1))*radius;
xCor = r.*cos(theta);
yCor = r.*sin(theta);
plot(xCor,yCor,'rx','LineWidth',2,'MarkerSize',10)
subplot(1,1,1)
hold on;
num = 1000;
rad = 10;
theta = rand(1,num)*(2*pi);
r = sqrt(rand(1,num))*rad;
xCor2 = r.*cos(theta);
yCor2 = r.*sin(theta);
plot(xCor2,yCor2,'gx','LineWidth',2,'MarkerSize',10)
Thanks...

Réponses (0)

Catégories

En savoir plus sur Data Distribution Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by