Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How to calculate the linear regression of each cell of z value of array data?

1 visualización (últimos 30 días)
Shakir Hussain
Shakir Hussain el 13 de Mzo. de 2019
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
How can calculate the linear regression/trend for z value of array
for example 10*16*108 and I want to apply regression formula only on z value (108) which will give the output matrix 10*16 showing unique trend of each cell of data.
I have no idea to get required output.
  4 comentarios
dpb
dpb el 14 de Mzo. de 2019
I have no idea what that means???
What do you want to fit to what?
I gather the content of the 3D array is the response variable, but what is the independent?
dpb
dpb el 14 de Mzo. de 2019
>> load subset
>> whos subset
Name Size Bytes Class Attributes
subset 817x941x23 17682331 uint8
>> subset(1:10,1:10,1:3)
10×10×3 uint8 array
ans(:,:,1) =
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
ans(:,:,2) =
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
ans(:,:,3) =
100 0 0 0 0 0 0 36 85 0
100 0 0 0 0 0 0 9 97 0
100 0 0 0 0 0 0 17 24 0
100 100 0 0 0 0 0 6 88 0
100 100 0 0 0 0 0 17 100 0
100 98 0 0 0 0 0 8 0 0
100 100 0 0 0 0 0 16 0 22
100 96 0 0 0 0 0 15 0 47
100 94 0 0 0 0 0 34 0 10
0 100 0 0 0 0 0 57 0 16
>> subset(1:10,1:10,end-4:end)
10×10×5 uint8 array
ans(:,:,1) =
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
ans(:,:,2) =
0 0 0 100 0 0 0 0 0 0
0 0 0 100 0 0 0 0 0 0
0 0 0 100 0 0 0 0 0 0
0 0 0 100 0 0 0 0 0 0
0 0 0 100 0 0 0 0 0 0
0 0 0 100 0 0 0 0 0 0
0 0 0 100 0 0 0 0 0 0
0 0 0 100 0 0 0 0 0 0
0 0 0 100 0 0 0 0 0 0
0 0 0 100 0 0 0 0 0 0
ans(:,:,3) =
100 100 100 100 100 100 100 100 100 0
100 100 100 100 100 100 100 100 100 0
100 100 100 100 100 100 100 100 100 0
100 100 100 100 100 100 100 100 100 0
100 100 100 100 100 100 100 100 100 0
100 100 100 100 100 100 100 100 100 0
100 100 100 100 100 100 100 100 100 0
100 100 100 100 100 100 100 100 100 0
100 100 100 100 100 100 100 100 100 0
100 100 100 100 100 100 100 100 100 0
ans(:,:,4) =
0 0 100 0 0 100 100 100 100 100
0 0 100 0 0 100 100 100 100 100
0 0 100 0 0 100 100 100 100 100
0 0 100 0 0 100 100 100 100 100
0 0 100 0 0 100 100 100 100 100
0 100 100 0 0 100 100 100 100 100
0 100 100 0 0 100 100 100 100 100
0 100 100 0 0 100 100 100 100 100
0 100 100 0 0 100 100 100 100 100
0 100 100 0 0 100 100 100 100 100
ans(:,:,5) =
100 100 100 100 100 100 100 100 100 100
100 100 100 100 100 100 100 100 100 100
100 100 100 100 100 100 100 100 100 100
100 100 100 100 100 100 100 100 100 100
100 100 100 100 100 100 100 100 100 100
100 100 100 100 100 100 100 100 100 100
100 100 100 100 100 100 100 100 100 100
100 100 100 100 100 100 100 100 100 100
100 100 100 100 100 100 100 100 100 100
100 100 100 100 100 100 100 100 100 100
>>
I see nothing theere about 10*16*108 and absolutely nothing that looks like would be a suitable indepenent variable for fitting against, nor does there seem to be any trend in the data in the array itself that makes any sense to put a trend line through.
Show us a SMALL example of what yuo think your data is and what you want to do with it.

Respuestas (0)

La pregunta está cerrada.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by