Plotting a line through 2 points
조회 수: 6 (최근 30일)
이전 댓글 표시
Hello,
I have a file with a difference in acceleration between 2 conditions, filename is 'ad'. I need to draw a line through 25% and 75% of the max of this data and then find the x-position where this line intercepts the x-axis.
Any help is appreciated, thanks.
댓글 수: 0
채택된 답변
Image Analyst
2013년 10월 1일
Use the line() function. Just figure out the two endpoints, which shouldn't be very hard at all. Use "hold on" before you call line() so that you don't blow away the curve.
댓글 수: 5
Image Analyst
2020년 9월 15일
Yes. Just try it. And there is a new function xline() if you want the line to run all the way across the entire distance in y, instead of just between two points inside the axes.
xline(xLeft, 'Color', 'r', 'LineWidth', 3);
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Object Properties에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!