필터 지우기
필터 지우기

plot curve from known coordinates and instantaneous slopes

조회 수: 2 (최근 30일)
monarch
monarch 2017년 12월 4일
댓글: Roger Stafford 2017년 12월 4일
I would like to plot a sample graph (a rough stress strain curve comparison) with 2 lines where my x,y and instantaneous slopes are known...and basically very roughly interpolate the curve between the two. is this possible?
  댓글 수: 1
monarch
monarch 2017년 12월 4일
Example plot: "line 1" would look something like upper aorta and "line 2" would look something like carotid.

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

답변 (1개)

Roger Stafford
Roger Stafford 2017년 12월 4일
Hint: Suppose your interpolated curve is the following general cubic polynomial with four unknown coefficients:
y = a*x^3+b*x^2+c*x+d
Its slope (derivative) would be:
s = 3*a*x^2+2*b*x+c
Using these two equations, you can write four linear equations that must be satisfied for each of your curves. In each case matlab can solve those four equations for the unknown a, b, c, and d values, and you then have your two interpolated curves (not "lines".)
  댓글 수: 2
monarch
monarch 2017년 12월 4일
Thank you, but I'm not sure how to turn the points and slopes I have into a plot given that information. (grey-haired researcher, new to Matlab here...trying to represent some pilot data in graphical form).
Roger Stafford
Roger Stafford 2017년 12월 4일
Use the two end y values in the first equation and the two end slope values in the second equation. This gives you your four linear equations in the unknown coefficients a, b, c, and d, which matlab can solve for you. Do this for each curve.

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

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by