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
채택된 답변
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
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 Center 및 File Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!