필터 지우기
필터 지우기

Plotting a V-shaped curve?

조회 수: 5 (최근 30일)
Jesse
Jesse 2011년 10월 7일
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!

채택된 답변

Walter Roberson
Walter Roberson 2011년 10월 7일
Consider using linspace()
  댓글 수: 1
Jesse
Jesse 2011년 10월 7일
Yes - that's it! It's this IDL to MATLAB that's getting to me Walter. Thank you!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by