How to plot an array in negative axes
이전 댓글 표시
I have initialized an array using the following code:
xdim=6;
ydim=12;
V_new=zeros(xdim+1,ydim+1);
V_new(5,4:10)=15;
V_new
Now, I want to plot this array from x=-3:9 and y=0:6.
However, I am not sure how to plot the array at the negative x-axis.
댓글 수: 3
Image Analyst
2018년 2월 3일
What does it mean, exactly, to "plot" a matrix? Do you mean surf()? Or does each row or each column show up as a line plot in a graph? Please clarify. Also tell us if you have ever heard of the xlim() and ylim() functions to set the plot ranges of the graph.
dpb
2018년 2월 3일
Say what!? You have an array that is all zeros except for seven elements in the 5th row that are a constant.
What's to plot and what possible relation is there between the array and two totally unrelated variables
x =-3:9
y = 0:6
???
Anum Ahmed
2018년 2월 3일
편집: dpb
2018년 2월 4일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!