How to make coordinate axis
조회 수: 7 (최근 30일)
이전 댓글 표시
I have a plot with limits or -3 to 3 which is plotting the columns of a 100x2 matrix (xaxis for first column and y axis for the second column). I need to plot dotted gray lines on the coordinate axis, (x = 0 and y = 0). A bit confused
댓글 수: 2
Gopalkrishna Bhat
2015년 5월 4일
Do you want to plot with the first column in X-axis & second column in Y-axis ? Can you elaborate it ?
답변 (2개)
Gopalkrishna Bhat
2015년 5월 4일
편집: Gopalkrishna Bhat
2015년 5월 4일
Hi Peter,
Assuming a matrix A of size 100x2 with random elements, I have provided the code for plotting the first column as the X-axis & second column as the Y-axis. You can replace the first command with your matrix .
a = rand(100,2);
x1 = a(:,1);
y1 = a(:,2);
plot(x1,y1)
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!