G
Guest
Hello
I have a 512*256 data file. What I want to be able to do is create a new matrix by doing the following
First, I want to calculate the linear fit equation for each row (the equation is different for each row). Then, I want to replace every value in that row with the value stored there minus the linear fit equation, where x is just the index number for the row. I want to be able to do this for all 512 rows, ultimately creating a whole new data set
Let me just provide you with an example so it's clear what I am asking. So in my data file there are 256 numbers in the first row. That first row has some associated linear fit equation. I want to replace all these 256 numbers with the old values minus the linear fit equation. So if a value is 10 (it's in the first row, x=1) and the linear equation is 5-x, my new value to replace 10 would be 10-(5-1) = 10-4 = 6. Then we would just want to repeat this for every row, and every cell in each row.
I would really appreciate any help on any part or all of this. Thank you very much for your help, I really appreciate it!!! If I'm not being clear just let me know. Thanks agai
Wy-Men Loh
I have a 512*256 data file. What I want to be able to do is create a new matrix by doing the following
First, I want to calculate the linear fit equation for each row (the equation is different for each row). Then, I want to replace every value in that row with the value stored there minus the linear fit equation, where x is just the index number for the row. I want to be able to do this for all 512 rows, ultimately creating a whole new data set
Let me just provide you with an example so it's clear what I am asking. So in my data file there are 256 numbers in the first row. That first row has some associated linear fit equation. I want to replace all these 256 numbers with the old values minus the linear fit equation. So if a value is 10 (it's in the first row, x=1) and the linear equation is 5-x, my new value to replace 10 would be 10-(5-1) = 10-4 = 6. Then we would just want to repeat this for every row, and every cell in each row.
I would really appreciate any help on any part or all of this. Thank you very much for your help, I really appreciate it!!! If I'm not being clear just let me know. Thanks agai
Wy-Men Loh