Q:

Experiment with the scatter and scatter3 functions

0

 Experiment with the scatter and scatter3 functions.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Ch12Ex7.m

% Investigates the scatter and scatter3 plots

% using random sizes and colors for random points

clf

%Number of points

n = 50;

%Data

x = rand([1 n])*10;

y = rand([1 n])*10;

%Size and color

s = randi([50,1000],1,n);

c = randi([1,64],1,n);

figure(1)

scatter(x,y,s,c,'filled')

title('Random sizes and colors')

%Number of points

n = 50;

%Data

x = rand([1 n])*10;

y = rand([1 n])*10;

z = rand([1 n])*10;

%Size and color

s = randi([50,1000],1,n);

c = randi([1,64],1,n);

figure(2)

scatter3(x,y,z,s,c,'filled')

title('Random sizes and colors')

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now