Plotting a V-shaped curve?
조회 수: 4 (최근 30일)
이전 댓글 표시
Hello all,
I don't know why I'm blanking out on this, but I am.
I'm trying to plot a V shaped curve. I need to plot 3 V's, if you will. All start at y = -0.5. The first V is centered at x = 32, and the bottom of the V goes down to y =-6. The width of the V is 9.
2nd V center is at x = 82, bottom of the V goes down to y = -10, and the width is 11.
Third V is centered at x = 152, again the bottom of the V goes down to y = -10, and the width is 51.
Straight lines connect the V's at -0.5, and the x scale is from 0 to 200.
I am aware of incrementing variables (for instance if you have x = [-4:1:4], x will increment in a for loop by 1 each time), but wasn't sure how to program in widths as you see with plotting V curves. Do you again invoke a for loop?
Thanks!
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!