plot two vectors simultaneuosly on the same axis?
    조회 수: 6 (최근 30일)
  
       이전 댓글 표시
    
Regards. I have 2 vectors. For example a=[2 4 3 6 7 8] and b=[7 5 2 4 4 1]. I wolud like to plot them both on x axis simultaneously, for exampe in order a=2,b=7,a=4,b=5... y axis is supposed to be 0 for vector a and 1 for vector b. is this possible to do? Thank you.
댓글 수: 0
채택된 답변
  Azzi Abdelmalek
      
      
 2014년 3월 28일
        a=[2 4 3 6 7 8] 
b=[7 5 2 4 4 1]
x=[a ;b]
x=x(:)
y=[zeros(size(a)); ones(size(b))]
y=y(:)
plot(x,y)
댓글 수: 4
  Azzi Abdelmalek
      
      
 2014년 3월 28일
				The order is not 2 1 2 1, you can check by
disp(x)
Maybe you mean something else
추가 답변 (1개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


