nlinfit: problem with global and local variables and input data matrix
3 次查看(过去 30 天)
显示 更早的评论
I am trying to use nlinfit to fit 14 sets of data to obtain a common exchange rate while a second scaling variable is also allowed to vary during the fit and should be different for each data set. I load a data file (f1) where the first row contains a 0 followed by my independent variables (24 of them) and each subsequent row has in column 1 a variable corresponding to the data in that row (ligand concentration) followed by the dependant variable (intensity) for the corresponding independent variables in row 1. I am getting the following error:
Error using nlinfit (line 122) Requires a vector second input argument.
Error in fit_lineshape_exchange (line 42) [beta,R]=nlinfit(x,y,@lineshape_exchange, beta0);
my function is below:
function f = lineshape_exchange(a)
%a(1) is k (the rate), a(2) is c (the weighting function allowing each
%spectrum to vary in intensity)
global K L v1 v2 Tp1 Tp2 w n
K=0.0000033;
Tp1=4.96;
Tp2=7.25;
v1=12.212;
v2=13.114;
f=0; for j=1:n
t=1/(a(1*L*(1+K)));
p1=K*a(1)*L*t;
p2=1-p1;
W=v1-v2;
P=t*((1/Tp1*Tp2)-4*pi^2*w^2+pi^2*W^2)+(p1/Tp1)+(p2/Tp2);
Q=t*(2*pi*w-pi*W*(p1-p2));
R=2*pi*w*(1+t*((1/Tp1)+(1/Tp2)))+pi*W*t*((1/Tp1)-(1/Tp2)+pi*W*(p1-p2));
f=a(2)*(P*(1+t*(p2/Tp1 + p1/Tp2))+Q*R)/(P^2+R^2);
end
回答(1 个)
Star Strider
2014-5-14
First, from the documentation, ‘ modelfun must accept two input arguments, a coefficient vector and an array X—in that order—and return a vector of fitted response values. ’ So your function statement should be:
function f = lineshape_exchange(a,x)
Second, what sizes are your x and y arrays? I get the impression they’re matrices and not vectors. The nlinfit function can take matrix x values, but must return a vector of estimated function values, and y must be a vector as well. (The lsqcurvefit function in the Optimization Toolbox can take matrix independent variables and fit them to matrix dependent variables.)
16 个评论
Julie
2014-5-14
The data file I load is below. Basically, I have intensity vs. frequency data for increasing amounts of a binding partner I am adding to a protein to form a complex. I was hoping to load all my data and have my fit mfile (also below) deal with extracting the correct row of data and values of L to use for each fit.
f1= 0 13.627 13.549 13.471 13.393 13.315 13.236 13.158 13.08 13.002 12.924 12.846 12.768 12.689 12.611 12.533 12.455 12.377 12.299 12.221 12.142 12.064 11.986 11.908 11.83 11.752
0 -1065.0592 -1211.71057 -856.98804 -531.41229 -893.48578 -986.63025 -918.69916 -109.00397 831.30347 993.21808 294.64252 -152.99203 -315.96314 146.8889 301.44775 838.57312 8316.95019 67597.40625 134763.2188 87617.96875 16666.29883 3421.37939 1571.36316 410.51562 72.57593
9 -1703.73584 -168.12866 789.64722 47.88208 1053.0144 2968.02295 4267.29297 2023.13257 2187.24414 1070.43872 494.38843 441.92407 982.57385 2506.96777 5016.04541 8904.80859 21991.72266 58715.40625 81474.96875 51473.53906 16955.95312 7286.82764 5943.39551 1376.10278 1042.12024
18 -39.62695 700.45947 880.60693 1672.54761 5490.44434 10250.34961 10380.7793 6425.10059 6905.46533 6553.79688 6200.93555 5450.68262 4783.33496 5999.4292 7567.62451 11676.40039 25238.00391 44612.70703 48212.02734 31467.79102 14820.61523 7434.34668 4969.66113 3741.05395 1968.92871
36 1043.43018 1107.2915 867.73779 5146.99512 10612.75098 15606.82129 17111.01367 15553.41211 13606.79297 11644.58398 9904.29102 8363.57617 8394.67383 9185.61426 11504.78906 15183.7041 18597.78906 19856.51953 18239.32031 14534.8418 10632.95703 7895.86572 5961.84131 2730.13037 844.76611
40 955.84497 2015.80225 2387.98047 4048.4624 11210.70312 16925.08203 19031.31055 17363.96484 14155.95312 12351.83789 12254.92773 12554.97559 8054.34082 7015.4541 9957.03027 12886.91992 15665.52832 16681.64844 15349.11035 11559.93652 6778.93994 2888.54883 2653.48828 1996.67981 462.49243
50 816.61426 1340.49951 2559.72241 4974.0498 11448.54688 18123.99414 22077 21455.01172 17330.70312 13263.42481 12302.31055 12430.32227 10510.09863 8609.22852 8700.05859 11117.88281 13825.72266 13037.2832 10703.99121 7670.78467 4957.00293 2900.64209 1040.67224 2628.21582 2260.03833
70 1724.04956 1974.71899 3508.62842 6614.21143 14141.95898 22662.28711 29631.51758 30185.56836 24522.78125 20425.20117 17182.12695 14347.07422 11488.67969 9485.25684 8113.57764 7390.01367 6137.35059 4852.66846 4065.29761 1038.77881 2389.02588 2390.88355 1635.01221 887.71338 418.07263
118 1017.89062 3290.80713 2461.18628 6337.92041 10516.60254 27073.01367 47504.57031 49338.07031 32321.31836 17756.05273 10994.10547 7089.5957 5681.59668 5528.44141 3266.34937 1683.14502 1117.92139 1018.42493 1810.63977 1372.02917 409.14453 208.14368 503.91351 749.15692 609.94269
138 478.78796 276.61523 943.86523 3912.71606 10665.20508 26013.48047 49891.15625 52589.57031 32083.81641 14279.88379 7967.62402 2074.96045 1551.20606 2382.36328 1204.91748 660.64294 433.22656 293.98059 877.6582 425.44501 306.06085 582.08484 762.74091 773.78149 848.60443
152 -212.7782 806.15381 1836.09131 2703.93774 6954.34522 24789.8418 52799.79297 55614.00391 30688.68164 11702.89648 7908.93018 7220.44189 991.13086 176.91162 426.85034 595.06372 1902.92786 1999.74829 261.81982 127.63409 1488.17212 819.18957 809.03778 547.50305 402.78043
170 421.03442 679.49683 1223.23584 1319.02173 7267.28906 27667.15625 57490.22656 59154.5625 30209.49023 10021.16992 5106.10645 2895.95361 263.38672 4925.26855 535.75537 470.86707 656.37109 723.2934 -176.93835 -80.99463 460.82233 592.15222 624.12665 -272.06909 -973.29181
179 144.40857 243.18066 855.50024 1911.75195 7785.42334 24537.07617 53844.03125 56273.88672 29028.33984 12262.52441 8271.73731 4480.6875 752.30762 290.34033 593.19531 956.20917 722.90625 289.04041 86.98852 193.8642 372.54791 40.64154 29.01819 -144.94244 -311.20447
188 712.8313 30.62354 297.38672 1315.11987 5841.479 24975.31641 58066.73438 60861.19141 30210.11523 11398.08008 9358.29785 7345.10352 4206.13623 648.10962 1151.78479 1603.72144 994.3385 783.32489 472.1008 347.92139 159.12595 182.41538 -399.45337 2497.44824 336.76511];
And my fit mfile is:
%lnshp_exchange.m
% simulation of lineshape to extract kon rate
%used to extract kon from titration lineshape analysis wiht known Kd
%k is kon, p1 is protein population, p2 is PL complex population, K is Kd,
%v1 is P shift, v2 is PL shift, Tp1 is T2 of protein, Tp2 is T2 of PL
%complex
%
%
global K L v1 v2 Tp1 Tp2 w n
K=0.0000033;
Tp1=4.96;
Tp2=7.25;
v1=12.212;
v2=13.114;
f1=f1(:,:);
nrows=length(f1(:,1));
ncols=length(f1(1,:));
n=nrows-1;
for i=2:ncols
w=((v1+v2)/2)-f1(1,i);
for l=2:nrows
L=f1(l,1);
beta0=[1*10.^6 0.8];
[beta,R]=nlinfit(x,y,@lineshape_exchange, beta0);
y_fit=lnshp_exchange(beta,x);
plot (x,y,'o',x,y_fit, 'r-')
fprintf(' Rate kon=%2.5e\n', beta(1,1));
fprintf(' Intensity scaling factor=%2.5e\n', beta(1,2));
fprintf(' Std Dev of residuals=%2.5e\n',std(R));
end
end
Star Strider
2014-5-14
编辑:Star Strider
2014-5-14
I just now saw your previous post. I thought ‘exchange rate’ had to do with economics, and since that is far from my areas of expertise, didn’t look. Your actual problem turns out to be very much within them.
There, I got the impression you want to fit a vector of x values to a matrix of y values, something nlinfit doesn’t permit.
If you are fitting your x vector to each row of your y vector independently, nlinfit will comply.
You have to do the y-row selection in a separate calling program, pass your x vector and each row of your y matrix to nlinfit individually from within a for-loop, and then collect the necessary outputs from nlinfit. (I suggest you get all of them, since you will likely need them for nlparci and nlpredci.)
Do not pass the indicator variable ( 0, 9, 18, 36, etc. ) to it, because its presence in the vector will result in unequal x and y lengths, and throw an error. Save your indicator variables in a separate vector that corresponds to the subscripts in the beta and other results arrays you save.
So your code will go something like this:
for k1 = 1:size(y,1)
yr = y(k1,:);
[beta(:,k1),R(:,k1)]=nlinfit(x,yr,@lineshape_exchange, beta0);
end
This assumes your x and y values are row vectors, and beta and R are column vectors. If the beta and R vectors are row vectors, the subscripts become (k1,:) instead.
Julie
2014-5-15
Thanks! Yes, I should have specified I was fitting for a chemical exchange process. I have a couple more questions though.. The indicator variable is also a values used in the fit equation (ligand concentration) so I have stored it in a separate vector and called upon it in a separate for-loop - hopefully correctly. Also, a value w is calculated from 2 constants each value in my x vector. Not sure what the best way to deal with this. For now I have included it in my function mfile. If I try to use my update miles (pasted below) I get a new error about the output vector size:
Error using nlinfit (line 148) MODELFUN must be a function that returns a vector of fitted values the same size as Y (1-by-25). The model function you provided returned a result that was 1-by-1.
One common reason for a size mismatch is using matrix operators (, /, ^) in your function instead of the corresponding elementwise operators (., ./, .^).
Error in fit_lnshp_exchange (line 53) [beta(:,k1),R(:,k1)]=nlinfit(x,yr,@lineshape_exchange, beta0);
Updated function file:
function f = lineshape_exchange(a,x)
%a(1) is k (the rate), a(2) is c (the weighting function allowing each
%spectrum to vary in intensity)
global K L v1 v2 Tp1 Tp2 w n p
f=0;
for j=1:length(x);
t=1/(a(1).*L.*(1+K));
p1=K.*a(1).*L.*t;
p2=1-p1;
W=v1-v2;
w=((v1+v2)/2)-x(j);
P=t.*((1./Tp1*Tp2)-4.*pi.^2.*w.^2+pi.^2.*W.^2)+(p1./Tp1)+(p2./Tp2);
Q=t.*(2.*pi.*w-pi.*W.*(p1-p2));
R=2.*pi.*w.*(1+t.*((1./Tp1)+(1./Tp2)))+pi.*W.*t.*((1./Tp1)-(1./Tp2)+pi.*W.* (p1-p2));
f=a(2).*(P.*(1+t.*(p2./Tp1 + p1./Tp2))+Q.*R)/(P.^2+R.^2);
end
Updates Fit mfile:
%lnshp_exchange.m
% simulation of lineshape to extract kon rate
%used to extract kon from titration lineshape analysis wiht known Kd
%k is kon, p1 is protein population, p2 is PL complex population, K is Kd,
%v1 is P shift, v2 is PL shift, Tp1 is T2 of protein, Tp2 is T2 of PL
%complex % %
global K L v1 v2 Tp1 Tp2 w n p
K=0.0000033;
Tp1=4.96;
Tp2=7.25;
v1=12.212;
v2=13.114;
p=75.2;
% paste in frequnies for x and intenisities for y from nmrpipe 1D ascii % ouput
x = [13.627 13.549 13.471 13.393 13.315 13.236 13.158 13.08 13.002 12.924 12.846 12.768 12.689 12.611 12.533 12.455 12.377 12.299 12.221 12.142 12.064 11.986 11.908 11.83 11.752];
y = [-1065.0592 -1211.71057 -856.98804 -531.41229 -893.48578 -986.63025 -918.69916 -109.00397 831.30347 993.21808 294.64252 -152.99203 -315.96314 146.8889 301.44775 838.57312 8316.95019 67597.40625 134763.2188 87617.96875 16666.29883 3421.37939 1571.36316 410.51562 72.57593 -1703.73584 -168.12866 789.64722 47.88208 1053.0144 2968.02295 4267.29297 2023.13257 2187.24414 1070.43872 494.38843 441.92407 982.57385 2506.96777 5016.04541 8904.80859 21991.72266 58715.40625 81474.96875 51473.53906 16955.95312 7286.82764 5943.39551 1376.10278 1042.12024 -39.62695 700.45947 880.60693 1672.54761 5490.44434 10250.34961 10380.7793 6425.10059 6905.46533 6553.79688 6200.93555 5450.68262 4783.33496 5999.4292 7567.62451 11676.40039 25238.00391 44612.70703 48212.02734 31467.79102 14820.61523 7434.34668 4969.66113 3741.05395 1968.92871 1043.43018 1107.2915 867.73779 5146.99512 10612.75098 15606.82129 17111.01367 15553.41211 13606.79297 11644.58398 9904.29102 8363.57617 8394.67383 9185.61426 11504.78906 15183.7041 18597.78906 19856.51953 18239.32031 14534.8418 10632.95703 7895.86572 5961.84131 2730.13037 844.76611 955.84497 2015.80225 2387.98047 4048.4624 11210.70312 16925.08203 19031.31055 17363.96484 14155.95312 12351.83789 12254.92773 12554.97559 8054.34082 7015.4541 9957.03027 12886.91992 15665.52832 16681.64844 15349.11035 11559.93652 6778.93994 2888.54883 2653.48828 1996.67981 462.49243 816.61426 1340.49951 2559.72241 4974.0498 11448.54688 18123.99414 22077 21455.01172 17330.70312 13263.42481 12302.31055 12430.32227 10510.09863 8609.22852 8700.05859 11117.88281 13825.72266 13037.2832 10703.99121 7670.78467 4957.00293 2900.64209 1040.67224 2628.21582 2260.03833 1724.04956 1974.71899 3508.62842 6614.21143 14141.95898 22662.28711 29631.51758 30185.56836 24522.78125 20425.20117 17182.12695 14347.07422 11488.67969 9485.25684 8113.57764 7390.01367 6137.35059 4852.66846 4065.29761 1038.77881 2389.02588 2390.88355 1635.01221 887.71338 418.07263 1017.89062 3290.80713 2461.18628 6337.92041 10516.60254 27073.01367 47504.57031 49338.07031 32321.31836 17756.05273 10994.10547 7089.5957 5681.59668 5528.44141 3266.34937 1683.14502 1117.92139 1018.42493 1810.63977 1372.02917 409.14453 208.14368 503.91351 749.15692 609.94269 478.78796 276.61523 943.86523 3912.71606 10665.20508 26013.48047 49891.15625 52589.57031 32083.81641 14279.88379 7967.62402 2074.96045 1551.20606 2382.36328 1204.91748 660.64294 433.22656 293.98059 877.6582 425.44501 306.06085 582.08484 762.74091 773.78149 848.60443 -212.7782 806.15381 1836.09131 2703.93774 6954.34522 24789.8418 52799.79297 55614.00391 30688.68164 11702.89648 7908.93018 7220.44189 991.13086 176.91162 426.85034 595.06372 1902.92786 1999.74829 261.81982 127.63409 1488.17212 819.18957 809.03778 547.50305 402.78043 421.03442 679.49683 1223.23584 1319.02173 7267.28906 27667.15625 57490.22656 59154.5625 30209.49023 10021.16992 5106.10645 2895.95361 263.38672 4925.26855 535.75537 470.86707 656.37109 723.2934 -176.93835 -80.99463 460.82233 592.15222 624.12665 -272.06909 -973.29181 144.40857 243.18066 855.50024 1911.75195 7785.42334 24537.07617 53844.03125 56273.88672 29028.33984 12262.52441 8271.73731 4480.6875 752.30762 290.34033 593.19531 956.20917 722.90625 289.04041 86.98852 193.8642 372.54791 40.64154 29.01819 -144.94244 -311.20447 712.8313 30.62354 297.38672 1315.11987 5841.479 24975.31641 58066.73438 60861.19141 30210.11523 11398.08008 9358.29785 7345.10352 4206.13623 648.10962 1151.78479 1603.72144 994.3385 783.32489 472.1008 347.92139 159.12595 182.41538 -399.45337 2497.44824 336.76511];
l = [0 9 18 36 40 50 70 118 138 152 170 179 188];
beta0=[1*10.^6 0.8];
n=length(l); for i=1:n L=l(i)*(1-p/K);
for k1 = 1:size(y,1)
yr = y(k1,:);
[beta(:,k1),R(:,k1)]=nlinfit(x,yr,@lineshape_exchange, beta0);
end
end
y_fit=lnshp_exchange(beta,x);
plot (x,y,'o',x,y_fit, 'r-')
Star Strider
2014-5-15
I honestly cannot follow your ‘lineshape_exchange’ function beyond figuring out that you’re only estimating the rate constant as a(1). I have no idea what ‘lineshape_exchange’ does.
It should use your ‘a’ and ‘x’ vectors something like this:
f = a(1).*exp(a(2).*x) + a(3);
This is only intended as an illustrative example, but you don’t need to refer to each element of x as you apparently do with your reference to x(j).
Don’t pass your weighting variable as a parameter to be estimated (an element of your ‘a’ parameter vector). It isn’t one. It is a parameter you need to pass to the function outside separately, and that is apparently used by the function somewhere.
You can do weighted nonlinear regression with nlinfit, and you can pass your ‘lineshape_exchange’ extra parameters (like your indicator variable) easily, but I get the impression it is simply a parameter and not a true weight vector.
Maybe I can help you sort this. What are your original equations for ‘lineshape_exchange’? If you have a PDF of the paper, attach it to your original post. (Use the ‘Edit’ option on your original post, then use the ‘paperclip’ icon to attach and upload the paper.)
Julie
2014-5-15
Okay, I will attach a paper. 'L' is not a weighting variable, just a variable specific to each row of my y matrix which is used in the lineshape_exchange function. I have changed a couple things from the paper (eqn on page 356, right-hand column): The paper is fitting for a folding/unfolding rate of a protein, and I am fitting for an exchange rate constant between free and ligand bound forms of a protein using intensity vs. frequency data (as in the paper) obtained over a series of additions of ligand. I am fitting a pseudo first order rate constant which is the rate multiplied by 'L', or the free ligand concentration; so my 't' is the tau from the paper adjusted for this as well as my p1 and p2.
Star Strider
2014-5-15
I’ll wait for the paper. Give me some time to read it and figure out what it is you’re doing.
Star Strider
2014-5-15
编辑:Star Strider
2014-5-15
I don’t see it yet. I’ll check back later, since sometimes it takes a while to appear.
You might want to check back from time to time as well to see when it appears. If it hasn’t in a half hour, upload it again.
TWO HOURS LATER (19:38Z — No upload yet.
Star Strider
2014-5-15
I finally found it — uploaded to your other question.
It’s going to take me a bit to get through it, since I have to figure out what they’re doing and then if I can do it in MATLAB.
To make it easier, what variable do you want to fit to your data? What parameter(s) do you want to estimate?
Julie
2014-5-16
编辑:Julie
2014-5-16
Great. Unlike the paper I am monitoring a protein, which has a peak intensity at a characteristic frequency, as I add increasing amounts of a binding partner causing the protein peak to shift from a it's characteristic 'free' frequency to a 'bound' frequency. I have values for the populations (pD and pN) as well as the frequencies associated with the two states (vN and vD). T2,D and T2,N have also been previously measured. pD and pN are known because the dissociation constant K=ku/kf (or in my case koff/kon representing the rate of ligand coming 'off' the complex/going 'on' to the complex) has been measured, so I have rewritten the pD and pN (I refer to these as p1 and p2 corresponding to free and bound protein populations) in terms of this constant and kon. Also, binding is a characterized by a pseudo first order rate constant (in my experiment) so rather than just kon, it is kon*concentration if ligand. I am trying to fit my series of experiments to a single, common kon and the constant (co in the paper, a(2) in my function) is allowed to vary in the fit to allow for changes in the overall intensity in each experiment due to other experimental factors. I am also going to attach a paper that uses the same set of equations for the same purpose I am. Please see Fig. 6.
Star Strider
2014-5-16
I’ll put the previous paper aside then, and give this one priority. Should I refer to the previous paper at all, or just this one? How do they interact? How do they apply to what you’re doing?
I have to come up to speed on this relatively quickly, so I need to know what particular ideas and equations to attend to.
- What equations are you fitting? I assume one or more of Eqns 3-6, but it would help for me to know sooner rather than later.
- What parameters are you estimating (in terms of the equations in the paper)?
- What are your independent and dependent variables (in terms of the equations in the paper) that you’re fitting?
- I assume you’re referring to Figure 6 (d)-(e), correct?
- How do the changes you’ve obviously made in your code (but haven’t posted) bear on what you have posted? (I’m going to code it up myself anyway, but I need to know if your approach has changed.)
- After we clarify the questions I’ve raised here, this is going to take me at least a few hours to read the paper (this one or both), understand how they relate to your data, code the function to give to nlinfit, and test the code to be sure it works before I post it here.
I’m somewhat familiar with the biochemistry (although H. sapiens, not E. coli) and the essence of NMR and spectral analysis, but I’ve not done anything similar to what you’re doing.
Julie
2014-5-16
The new paper is fitting experimental data which is essentially the same as mine, but there are no equations there just a reference to the original paper i posted regarding the equations used to fit Fig 6 (d) and (e). So I think the combination of the two should help clear up the whole scenario. I am fitting the equation on the right hand column of page 356 in the original paper - not sure which you are referring to, as they are not numbered. In terms of the paper, my independent variable is frequency (nu) and my dependant variable is intensity (I). The changes to the equations in the original paper that I have described (including those to pD and pN) are in the code I have posted. I will go through it below and try to relate eahc part to the equation in the original paper, pg 356 right-hand column:
beginning from the bottom of the list of the equations in the paper, I will list my code, then discuss the corresponding line in the equation in the paper:
t=1/(a(1).*L.*(1+K));
this is 'tau' in the paper = 1/ ku+kf
I have changed this in my code according to
ku is like koff in my system, and kf is like con
my pseudo first order rate constant: kon*[free ligand concentration]
K(equilibrium dissociation constant)=koff/kon
koff= K*kon*[free ligand]
'tau'=1/(kon*[free ligand]*(1+K))
I use L for [free ligand] and kon is what I am fitting for as a(1) and K is known from previous expts.
p1=K.*a(1).*L.*t;
p2=1-p1;
these two lines refer to the populations of free (p1) and bound protein (p2) in my experiment. The paper uses pN and pD for this purpose. Using the same equations etc. above I have re-written these in terms of the kon I which to fit and the known K value. p2 is = 1-p1 because because the protein can only exist in two forms, free or bound.
W=v1-v2;
in the paper this is δυ=υΝ−υD, v1 and v2 correspond to the free and bound frequencies respectively and are known.
w=((v1+v2)/2)-x;
in the paper this is Δυ=υΝ+υD/2 - u; where the u is the independent variable.
P=t.*((1./Tp1*Tp2)-4.*pi.^2.*w.^2+pi.^2.*W.^2)+(p1./Tp1)+(p2./Tp2);
Q=t.*(2.*pi.*w-pi.*W.*(p1-p2));
R=2.*pi.*w.*(1+t.*((1./Tp1)+(1./Tp2)))+pi.*W.*t.*((1./Tp1)-(1./Tp2)+pi.*W.*(p1-p2));
These are essentially the same as the paper for P, Q and R. pi is 3.14, 1/Tp1 and 1/Tp2 are values i have measured.
f=a(2).*(P.*(1+t.*(p2./Tp1 + p1./Tp2))+Q.*R)/(P.^2+R.^2);
This is the first listed equation 'I(u,kf,ku,Co)' in the paper. They have included a constant Co, which I include as a(2) and this is fit for reasons mentioned in the new paper related to allowing each data set to have varying overall intensity - intensity is proportional to protein population (or concentration) which should remain constant but may not appear so because of changes in the overall system when binding occurs that effect the intensity measured in the experiment.
Hope this helps!
Star Strider
2014-5-16
Thanks for the clarification. It’s still going to take me some time to go through the first paper to understand their derivations, but your annotated code should help.
Star Strider
2014-5-28
I found a different paper by one of the same authors in PNAS that explained the equations more clearly. I’m having problems understanding the NMR equations. That technology is definitely not my area of expertise, and I need to understand at least some of it in order to understand what you’re doing. It will be easier with a bit more information that I’m still not clear on:
- What parameters do you have and what are they?
- Do any of them change in the various data you posted, or are they constant across all?
- If any of them change, which ones? What values do they take for each run?
- What parameters do you want to estimate?
When I get the opportunity to read a bit more about NMR, I’ll probably go ahead and code the function myself. If it works, I’ll post it here.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Preprocessing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!发生错误
由于页面发生更改,无法完成操作。请重新加载页面以查看其更新后的状态。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
亚太
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)