Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Fitting complex data from dielectric spectrum to a complex parametric model
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Benjamin  
View profile  
 More options Feb 13, 11:29 am
Newsgroups: comp.soft-sys.matlab
From: "Benjamin " <benjami...@gmail.com>
Date: Mon, 13 Feb 2012 16:29:11 +0000 (UTC)
Local: Mon, Feb 13 2012 11:29 am
Subject: Fitting complex data from dielectric spectrum to a complex parametric model
Hello to everyone,

I am trying to extract the parametric values from fitting a set of dielectric spectrum complex data to a complex model as a function of the angular frequency w. As you can see, the dielectric model "d" is a complex function and the parameter vector "a" is real by definition.

However, the results do not show a good agreement when I plot the data "Y" versus the model "d" using the parameters "afinal" obtained from the fitting.

Anyone know how to fit this system of equations? Any ideas? Tips?

Thanks in advance.

global X Y
a;    % is the initial vector model parameters
X;    %X are the frequency values
Y;    %Y are the dielectric complex data

%options for the non-linear fitting
options = optimset('MaxFunEvals',10000);
options = optimset(options,'MaxIter',5000);
options = optimset(options,'TolFun',1e-9);
options = optimset(options,'TolX',1e-9);

[afinal,RESNORM,RESIDUAL,EXITFLAG] = lsqcurvefit(@myfun2,a,X,Y,[],[],options);

function d = myfun2(a,X)
%a=[a1   a2   a3   a4    a5   a6   a7    a8   a9   a10   a11 a12   a13   a14]
e0=8.85e-12; %vacuum permittivity

d = a(1)+ ...
    (a(2)./(1+(1i*2*pi*X*a(3)).^(1-a(4))))+ ...
    (a(5)./(1+(1i*2*pi*X*a(6)).^(1-a(7))))+ ...
    (a(8)./(1+(1i*2*pi*X*a(9)).^(1-a(10))))+ ...
    (a(11)./(1+(1i*2*pi*X*a(12)).^(1-a(13))))+ ...    
    a(14)./(1i*2*pi*X*e0);


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ron  
View profile  
 More options Mar 30, 6:01 pm
Newsgroups: comp.soft-sys.matlab
From: "ron " <toledano....@gmail.com>
Date: Fri, 30 Mar 2012 22:01:26 +0000 (UTC)
Local: Fri, Mar 30 2012 6:01 pm
Subject: Re: Fitting complex data from dielectric spectrum to a complex parametric model

If you have the answer to this one, tell me. (even just for brainstorming)

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roger Stafford  
View profile  
 More options Mar 30, 11:16 pm
Newsgroups: comp.soft-sys.matlab
From: "Roger Stafford" <ellieandrogerxy...@mindspring.com.invalid>
Date: Sat, 31 Mar 2012 03:16:12 +0000 (UTC)
Local: Fri, Mar 30 2012 11:16 pm
Subject: Re: Fitting complex data from dielectric spectrum to a complex parametric model
"Benjamin " <benjami...@gmail.com> wrote in message <jhbdon$4l...@newscl01ah.mathworks.com>...
> I am trying to extract the parametric values from fitting a set of dielectric spectrum complex data to a complex model as a function of the angular frequency w. As you can see, the dielectric model "d" is a complex function and the parameter vector "a" is real by definition.

 - - - - - - - - -
  The documentation for 'lsqcurvefit' contains what is apparently the explanation for your difficulties.  It states, under "Limitations", that "lsqcurvefit only handles real variables (the user-defined function must only return real values). When x has complex variables, the variables must be split into real and imaginary parts."  See the Mathworks website at:

 http://www.mathworks.com/help/toolbox/optim/ug/lsqcurvefit.html

  I interpret that to mean that you will have to split both X and Y into real and imaginary parts and the same with d = myfun2(a,X).  Your vectors will therefore have to be doubled in length.  However your real-valued parameter vector 'a' is presumably all right as it stands.

Roger Stafford


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »