Rank: 619 based on 113 downloads (last 30 days) and 7 files submitted
photo

Per Sundqvist

E-mail
Company/University
Chalmers Tekniska Högskola

Personal Profile:
Professional Interests:
quantum and mathematical physics

 

Watch this Author's files

 

Files Posted by Per View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
09 Jan 2009 Screenshot Exponential fit, without start-guess Fits 1) f=s1+s2*exp(-t/s3) or 2) f=s1+s2*exp(-t/s3)+s4*exp(-t/s5) to numerics, without startguess Author: Per Sundqvist exponential, nonlinear, initial guess, fit, exact, least square 40 10
  • 3.55556
3.6 | 10 ratings
12 Nov 2008 3D Data Interpolation 3D interpolation using modified 4-point vector Newton interpolation Author: Per Sundqvist mathematics, 3d interpolation, newton, interpolation, nonuniform, approximation 14 5
  • 2.5
2.5 | 6 ratings
16 Jan 2008 Screenshot erfi function Imaginary error function (could be complex) using matlab's incomplete gamma function gammainc Author: Per Sundqvist complex, gaussian, imaginary error funct..., integral 19 5
  • 2.33333
2.3 | 3 ratings
13 Jan 2005 Orthogonal Linear Regression Fits a line y=p0+p1*y to a dataset (xdata,ydata) in an orthogonal way. Author: Per Sundqvist approximation, interpolation, linear regression, interpolation orthogo..., least squares fit 10 11
  • 3.0
3.0 | 8 ratings
22 Nov 2004 Screenshot Points Inside polygone Finds those points (xi,yi) who are inside the polygon, defined by the vectors (x,y) Author: Per Sundqvist approximation, interpolation, 2d contour, random, find, polygon 1 3
  • 2.0
2.0 | 2 ratings
Comments and Ratings by Per
Updated File Comments Rating
03 Nov 2008 Exponential fit, without start-guess Fits 1) f=s1+s2*exp(-t/s3) or 2) f=s1+s2*exp(-t/s3)+s4*exp(-t/s5) to numerics, without startguess Author: Per Sundqvist

HI, B. Roossien. I'm not sure what kind of help you want. The code is standard but assumes perhaps that you are a bit familiar with matlab. nargin<4 means that your input arguments are 3 and you will then get options as specified, later on, at the end of the program used in the matlab function lsqcurvefit. Maby I should tell that t and f should be vectors of the same size? Or do you want me to explain the theoretical model? Its lengthy though...

As well I realize now that I in the beginning of the program should have wrote:
t=t(:);
f=f(:);
[t,ix]=sort(t);
f=f(ix);
%to make time and function f vectors sorted column vectors in case they have a funny formate like matrices.
/Per

Comments and Ratings on Per's Files View all
Updated File Comment by Comments Rating
21 Jun 2011 erfi function Imaginary error function (could be complex) using matlab's incomplete gamma function gammainc Author: Per Sundqvist OUKILA, Mohamed Yassin

what is erfz2?

19 May 2011 erfi function Imaginary error function (could be complex) using matlab's incomplete gamma function gammainc Author: Per Sundqvist Pisani, Marcelo

Function gives wrong results for high moduli input. For instance, using Maple ERF converted to DOUBLE (erfz2 function below):

>> z=3+2i; erfz2(z*i)/i, erfi(z)
ans =
   8.6873 -20.8295i
ans =
   8.6873 -20.8295i

>> z=7+7i; erfz2(z*i)/i, erfi(z)
ans =
  -0.0561 + 1.0102i
ans =
  7.3774e+024 +1.6269e+025i

13 May 2011 Exponential fit, without start-guess Fits 1) f=s1+s2*exp(-t/s3) or 2) f=s1+s2*exp(-t/s3)+s4*exp(-t/s5) to numerics, without startguess Author: Per Sundqvist Le, Tung
10 Mar 2011 Exponential fit, without start-guess Fits 1) f=s1+s2*exp(-t/s3) or 2) f=s1+s2*exp(-t/s3)+s4*exp(-t/s5) to numerics, without startguess Author: Per Sundqvist Gaszton
01 Nov 2010 erfi function Imaginary error function (could be complex) using matlab's incomplete gamma function gammainc Author: Per Sundqvist PLH

The program does not work as stated. When using complex z (i.e., not pure real, or pure imaginary), I get the following error:

Error using ==> gammainc
Inputs must be real, full, and double or single.

Error in ==> erfi at 19
ans=~isreal(x).*(-(sqrt(-x.^2)./(x+isreal(x))).*gammainc(-x.^2,1/2))+...

This also occurs for Example 2 provided with the code. I'm assuming it's a trivial problem since the figure above seems to correspond to what I would expect (look at the erfi article on Mathworld ). In case it's relevant, I'm using Matlab 7.10.0.499 (R2010a) (64-bit).

Top Tags Applied by Per
approximation, interpolation, 2d contour, 3d interpolation, complex
Files Tagged by Per View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
09 Jan 2009 Screenshot Exponential fit, without start-guess Fits 1) f=s1+s2*exp(-t/s3) or 2) f=s1+s2*exp(-t/s3)+s4*exp(-t/s5) to numerics, without startguess Author: Per Sundqvist exponential, nonlinear, initial guess, fit, exact, least square 40 10
  • 3.55556
3.6 | 10 ratings
12 Nov 2008 3D Data Interpolation 3D interpolation using modified 4-point vector Newton interpolation Author: Per Sundqvist mathematics, 3d interpolation, newton, interpolation, nonuniform, approximation 14 5
  • 2.5
2.5 | 6 ratings
16 Jan 2008 Screenshot erfi function Imaginary error function (could be complex) using matlab's incomplete gamma function gammainc Author: Per Sundqvist complex, gaussian, imaginary error funct..., integral 19 5
  • 2.33333
2.3 | 3 ratings
13 Jan 2005 Orthogonal Linear Regression Fits a line y=p0+p1*y to a dataset (xdata,ydata) in an orthogonal way. Author: Per Sundqvist approximation, interpolation, linear regression, interpolation orthogo..., least squares fit 10 11
  • 3.0
3.0 | 8 ratings
22 Nov 2004 Screenshot Points Inside polygone Finds those points (xi,yi) who are inside the polygon, defined by the vectors (x,y) Author: Per Sundqvist approximation, interpolation, 2d contour, random, find, polygon 1 3
  • 2.0
2.0 | 2 ratings

Contact us at files@mathworks.com