How to linear fit two y variables in same plot?

2 visualizaciones (últimos 30 días)
Shyam Pahari
Shyam Pahari el 25 de Mayo de 2022
Respondida: Walter Roberson el 25 de Mayo de 2022
Hello,
I ploted (x1,y1) and (x2,y2) in same plot where all variables are different. I want to find linear fit for each of them ie x1,y1 and x2,y2 , However, the basic fit ui let me choose either data 1 or data 2 linear fit, but not both. How can I fit both data series simultaneously? thank you.

Respuesta aceptada

Walter Roberson
Walter Roberson el 25 de Mayo de 2022
polyfit(x1, y1, 1)

Más respuestas (1)

Torsten
Torsten el 25 de Mayo de 2022
Editada: Torsten el 25 de Mayo de 2022
Choose X = [x1,x2], Y = [y1,y2] as data to be fitted.

Categorías

Más información sobre Get Started with Curve Fitting Toolbox 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