Linear fit for data from 3D matrix

8 vues (au cours des 30 derniers jours)
James Lorringer
James Lorringer le 10 Sep 2015
Commenté : Star Strider le 10 Sep 2015
Hello community! I have a 3D matrix like this:
val(:,:,1) =
2.5620 2.0040 1.8380
2.2240 1.9160 1.9030
val(:,:,2) =
2.0330 1.9970 1.8180
2.4040 1.9330 1.9300
val(:,:,3) =
2.4260 2.1040 1.9050
1.9960 1.9630 1.9560
I need to make a linear fit for every group on z axis (here for example, 2.5620, 2.0330, 2.4260). For the fit in 2D plot (just to make it clear, I do not need the plot), the y axis is the same as the z axis of the 3D matrix (suppose simply 1,2 and 3)and x axis is based on the values of the element. After this, I have to get the values on the fit (by y=1,2 and 3) and use the values in 3D matrix minus the values from the fit. Could someone please help me on this? Thank you very much!
  1 commentaire
Star Strider
Star Strider le 10 Sep 2015
I’m not entirely clear on what you’re asking. Please give an example of what you want to fit, specifying your independent and dependent variables.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Interpolation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by