Borrar filtros
Borrar filtros

How to do a yearly regression?

1 visualización (últimos 30 días)
Malene Brautaset
Malene Brautaset el 31 de Mzo. de 2022
Respondida: Shreeya el 22 de Sept. de 2023
Hello,
We have accounting data from 2010 - 2020, and want to do one regression year by year such as showed above.
The photo below shows how our data is displayed. Hope someone can help.

Respuestas (1)

Shreeya
Shreeya el 22 de Sept. de 2023
I understand you want to perform an year wise regression on the this dataset. You can follow the below steps to achieve this
  • Import the dataset to the MATLAB workspace into a variable called "trainingData".
  • Inside a "for" loop, index the dataset to seperate the data of all the years. For example:
trainingData2010 = trainingData(trainingData.year == 2010,:);
I hope this is helpful in addressing your query.

Categorías

Más información sobre Interactive Control and Callbacks 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