Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- g = fittype('a*integral(@(tau) (Cp(tau)./(1-.42)).*exp((-x-tau).*(a/b)),0,x)','coeff',{'a','b'});
- fit(T,AvgYf,g);
- function varout = Cp(varin)
- p = [.809,.330,.17046, 0.365, .0563, .132, 1.020, .1685, 38.078, .483];
- max = size(varin);
- varout = zeros(1,max(2));
- n = 1;
- while n < max(2) + 1
- varout(n) = p(1)/(p(5)*sqrt(2*pi))*exp(-(varin(n)-p(3)).^2/(2*p(5)^2))+ p(2)/(p(6)*sqrt(2*pi))*exp(-(varin(n)-p(4)).^2/(2*p(6)^2)) + p(7)*exp(-p(8)*varin(n))/(1+exp(-p(9)*(varin(n)-p(10))));
- n = n + 1;
- end
- end
- Error using fittype (line 356)
- Expression a*integral(@(tau) (Cp(tau)./(1-.42)).*exp((-x-tau).*(a/b)),0,x) is not a valid MATLAB expression, has non-scalar
- coefficients, or cannot be evaluated:
- Error in fittype expression ==> a.*integral(@(tau) (Cp(tau)./(1-.42)).*exp((-x-tau).*(a./b)),0,x)
- ??? A and B must be floating point scalars.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement