We have been trying to fit experimental diffusion results to the diffusion equation using Matlab to evaluate the Diffusion coefficient.(adsbygoogle = window.adsbygoogle || []).push({});

The equation we used:

y=C*erfc(x/(2*sqrt(D*t)))

Experimental values [x],[y] and t are given. C and D are to be evaluated from the curve fit.

We used cftool of Matlab.

We have a problem in getting the results. We get error message as:

"Error using ==> <a href="error:C:\Program Files\MATLAB\R2007b\toolbox\curvefit\curvefit\@fittype\feval.m,97,0">fittype.feval at 97</a>

Error in fittype expression ==> C.*erfc(x./(2.*sqrt(D.*300)))

??? Error using ==> erfcore

Input must be real."

Can anyone help?

**Physics Forums - The Fusion of Science and Community**

# Curve fitting to diffusion equation(Matlab)

Know someone interested in this topic? Share a link to this question via email,
Google+,
Twitter, or
Facebook

- Similar discussions for: Curve fitting to diffusion equation(Matlab)

Loading...

**Physics Forums - The Fusion of Science and Community**