Is there a way to pass in a matrix of color values (n*3) into plot in matlab
1 次查看(过去 30 天)
显示 更早的评论
Can i pass in a matrix of color values into matlab plot function, such that it colors each of my line plots a different color in one go instead of using a for loop.
0 个评论
回答(1 个)
KSSV
2020-2-18
You need not use a loop..you can make your data a matrix and use plot.
X = repmat(1:10,10,1) ;
Y = rand(10) ;
plot(X',Y')
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Colormaps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!