How to plot a curve with 3 points?

48 visualizaciones (últimos 30 días)
Vanessa Chimedza
Vanessa Chimedza el 28 de En. de 2022
Comentada: Vanessa Chimedza el 29 de En. de 2022
x= [1.2 1.5 1.9];
y=[5.5e15 9.9e15 7.8e15];
I want to plot a graph like this using the 3 points .How can I do it?
  2 comentarios
Image Analyst
Image Analyst el 28 de En. de 2022
Three points are enough to define a quadratic, but not a Rayleigh-like curve like you're showing. You need more, or else a formula.
Vanessa Chimedza
Vanessa Chimedza el 29 de En. de 2022
Thank you.

Iniciar sesión para comentar.

Respuesta aceptada

Voss
Voss el 28 de En. de 2022
You can plot those three points and connect them with line segments using the plot() function:
x= [1.2 1.5 1.9];
y=[5.5e15 9.9e15 7.8e15];
plot(x,y)
It's not clear how the plot you want is related to those points. Maybe by fitting a curve?

Más respuestas (1)

Matt J
Matt J el 28 de En. de 2022
Editada: Matt J el 28 de En. de 2022
plot(x,y)
will always plot a curve. Whether you have enough points for the curve to have the intended shape is another question.

Categorías

Más información sobre Interpolation en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by