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

Home » Public Forums » archive » Re: strange behaviour of ladfit - known?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: strange behaviour of ladfit - known? [message #52888 is a reply to message #52884] Thu, 08 March 2007 06:45 Go to previous message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Mar 8, 3:29 am, Ingo von Borstel <newsgro...@planetmaker.de> wrote:
> Hi there,
>
> I just encountered a strange behaviour of ladfit - it just won't return
> to the command prompt when I do the following:
>
> ###############################
> ; create an array and initilize it
> x = dblarr(100)
> for i=0,99 do x[i] = sin(2*!pi/15*i)
>
> ;get a short subarray and create another scaled version of it.
> Important: without offset
> xcut = x[20:30]
> y = xcut * 1.6
>
> ; calculate the linear relation between xcut and y - or rather try it.
> print, ladfit(xcut,y)
> ###############################
>
> It works nicely as soon as I add an offset to y or if I use different
> data, though I can reproduce it with any subset of x. Is there a way to
> circumvent this behaviour or test prior to its occurence for it, if I
> don't know my input data prior to the start of a programme? I'm using
> IDL 6.1.
> Or does anyone know whether this behaviour can be reproduced with a
> newer version of IDL?
>
> Best regards,
> Ingo
>
> --
> Ingo von Borstel <newsgro...@planetmaker.de>
> Public Key:http://www.planetmaker.de/ingo.asc
>
> If you need an urgent reply, replace newsgroups by vgap.

I'm using IDL 6.1 on sparc sunos and your code works fine:

IDL> print, ladfit(xcut,y)
% Compiled module: LADFIT.
0.00000000 1.60000000

BTW - how about using:
x = sin(2*!pi/15*dindgen(100))
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Structure compare
Next Topic: Re: What is the difference between 'curvefit', 'lmfit' and 'svdfit' procudure?

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

Current Time: Fri Oct 10 19:27:30 PDT 2025

Total time taken to generate the page: 0.39978 seconds