有没有一种方法可以在绘制矩阵时指定线条的颜色?
例如:
例如:
// here is my matrix A
A = [13, 3, 4;19, 0, 1;18, 0, 2;19, 0, 1;19, 0, 1];
// when I am plotting it I am not in control of what color each line will be
plot(A)
使用
plot(A, 'r')
只需将所有内容涂成红色(这是预期的结果) 当尝试以下操作时:
plot(A, ['r', 'g','b'])
或者
plot(A, 'rgb')
不起作用(这并不奇怪)
那么有没有办法为每行指定颜色?