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!