Is there a way to plot two or several matrixes in one Diagramm using the same collor for respectively two Graphes?
이전 댓글 표시
clear
close all
load Test2_-4-0.mat
A={pts.z,pts.voltage}
load Test2_0-4.mat
v=flip(pts.z)
B={v,pts.voltage}
A1=[A(:),B(:)]
plot(A1{:})
legend('v1','V2','opt','lin')

While the matrices A and B are:

Is there a way to tell Matlab it should relate to each column of the pts.voltage matrix (41x4) a specific color (or always the same color)? So two graphes have the same color.
Or some other soloution?
Without using too much code for example like:
plot(z,x(:,1),'r',z,x(:,2),'b',z,x(:,3),'g',z,x(:,4),'m')
hold on
plot(v,y(:,1),'r',v,y(:,2),'b',v,y(:,3),'g',v,y(:,4),'m')
hold off
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

