How to plot a horizontal line between two arrays?
이전 댓글 표시
Hi all,
I have the following arrays, I want to draw a horziontal line between each row. Could someone please teach me how to do that?
A = [5:1:45]
B = [10:1:50]
So what I want is a horzintal/flat line between each point of A and B. For instance a flat line for A(1)=5 at a Y of 1 extended to B(1)=10 at the same Y. Like the image below:
Thanks in advance

댓글 수: 3
Star Strider
2021년 3월 12일
Please provide a bit more detail.
The problem is that ‘A’ is a (1x41) vector and ‘B’ is a (1x6) vector.
How should the lines be drawn?
Wolfgang McCormack
2021년 3월 12일
Star Strider
2021년 3월 12일
Not in time for me to see it and post an Answer.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!