How to fit multiple 2D surfaces to the same equation?

2 次查看(过去 30 天)
I have a few 2D maps (attached .mat files from MRI data) obtained at different energies (B1 in uT: 0.5, 1.0, 1.5 and 2.0). The higher B1, the higher signal (min possible value of 0 and max possible value of 100).
I am interested in signal intensity at an intermediate energy level that is why I acquired a few maps for calibration .
I know that Signal=A*(ENERGY^2)+B*(ENERGY)+C; I need to find out the matrices of A, B and C.
This cartoon is just to give an idea of what I have.
I can fit pixel by pixel to the quadratic equation to obtain the calibration curve for this particular pixel (fig.2) and then calculate signal at this pixel at any B1 but it is way too slow. Could you suggest how to fit the all 4 maps simultaneously to the equation? I have an access to server and so memory is not an issue.
The attached 2D maps are set1 (energy 0.5uT), set2 (energy 1.0 uT), set3 (energy 1.5 uT) and set4 (energy 2.0 uT). Signal is in the range 0-100. Higher energy, higher signal. Let's assume that I want to calculate the map at an energy of 1.2 uT. Many thanks in advance.
  5 个评论
Alex
Alex 2014-3-31
Yes, if I find the matrices for A, B and C, I can just plug a constant Energy into the equation. I also was thinking about spline but failed to apply it.
Alex
Alex 2014-4-2
编辑:Alex 2014-4-2
Tried to simplify the task and added more detailed info to the question description.

请先登录,再进行评论。

采纳的回答

Star Strider
Star Strider 2014-3-31
编辑:Star Strider 2014-3-31
Splines certainly have their uses, but parametric curve fitting isn’t one of them. This approach that I have used myself ( 2D data fitting - Surface ) has worked on several occasions. The idea is to combine your X, Y, and Energy matrices into one in order to pass it as one variable to lsqcurvefit, then write your equation (that you can easily write as an anonymous function) to separate the single variable into individual variables. If Signal is a single (Nx1) vector or an (NxM) matrix (I don’t know what M might be), lsqcurvefit will work. Your regression function must output the same dimensions as your Signal matrix has.
If you want to attach (‘Paperclip’ icon) a few rows and columns of the most representative data, (about 20 rows of Energy and Signal and matching vectors of X and Y), I might be able to fit them and offer suggestions if you have problems.
  6 个评论
Alex
Alex 2014-4-3
编辑:Alex 2014-4-3
@ Star Strider. Thank you very much for your time, I am new to surface fitting and so I could not handle it myself. But since now I realize how hard it is, I think I would go for pixel by pixel fitting using full power of the servers available to me. Sorry for making your life a bit more difficult and many thanks for your help.
Star Strider
Star Strider 2014-4-3
I was hoping you would post data representing the surfaces in your original question, since I don’t know how to get them from the data you posted. Are they Fourier transforms (transfer functions)?
The surfaces in [set1 ... set4] seem impossible to fit even with respect to one surface, because of the discontinuities. I’ve not been able to find any documentation on the sort of surface fitting you want to do, but I would be willing to see if it’s possible with the correct data. With the ‘correct’ data, my next approach would be to fit each Signal surface, then fit those equations with respect to the values in Energy.
I suggest you experiment with interpn on the data in your original post. I would, but I don’t have access to those data.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by