plot curve from known coordinates and instantaneous slopes
Mostrar comentarios más antiguos
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 comentario
monarch
el 4 de Dic. de 2017
Respuestas (1)
Roger Stafford
el 4 de Dic. de 2017
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 comentarios
monarch
el 4 de Dic. de 2017
Roger Stafford
el 4 de Dic. de 2017
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.
Categorías
Más información sobre Vector Fields en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
