different colour combinations in matlab

回答(2 个)

Use scatter. The syntax is scatter(x,y,Size,Colors). Size is the size of the markers and Colors can be 20 rgb values as in Example 1 here .
Sindhu, use this code:
x=[1:20]./7;
y=sin(x);
hold on
for i=1:length(x)
plot(x(i),y(i),'*',...
'color', rand(1,3))
end

类别

帮助中心File Exchange 中查找有关 Scatter Plots 的更多信息

提问:

2014-8-13

回答:

2014-8-13

Community Treasure Hunt

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

Start Hunting!

Translated by