comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » CURVEFIT question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
CURVEFIT question [message #45308] Wed, 31 August 2005 01:29
elias is currently offline  elias
Messages: 13
Registered: April 2005
Junior Member
Hi,

I am trying to fit a function to a set of data that I have generated
with a program in IDL.

I have made various checks to see that the generated data is correct.

So what I have is:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
X FLOAT = Array[320]
Y FLOAT = Array[320]

weights=1.0/y (WEIGHTS FLOAT = Array[320])

init=1.0 (;initial value for the user function)

yfit=CURVEFIT(x,y,weights, init, SIGMA, /NODERIVATIVE,
FUNCTION_NAME='microfit')
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~


The microfit function is:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PRO microfit, x, init, f, pder

f=1.0-0.5*(ERF((1-x)/init)+ERF((1+x)/init))
pder = FltArr(N_ELEMENTS(x))

END
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I do not really understand completely how CURVEFIT works (I am also new
in IDL), but I use /NODERIVATIVE since I don't have analytical
expression for the partial derivative df/dinit.

I get this error message:

% Operands of matrix multiply have incompatible dimensions: <FLOAT
Array[1]>, PDER.

Any idea?
[Message index]
 
Read Message
Previous Topic: pixmap problem
Next Topic: Re: Bases de datos

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:58:37 PDT 2025

Total time taken to generate the page: 0.00415 seconds