Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6832 > unrolled thread

Re: import data problem

Started by"Dr. Harald von der Osten" <hvdosten@gmail.com>
First post2011-11-30 08:23 +0000
Last post2011-11-30 08:23 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: import data problem "Dr. Harald von der Osten" <hvdosten@gmail.com> - 2011-11-30 08:23 +0000

#6832 — Re: import data problem

From"Dr. Harald von der Osten" <hvdosten@gmail.com>
Date2011-11-30 08:23 +0000
SubjectRe: import data problem
Message-ID<jb4p5p$gr3$1@smc.vnet.net>
Hi Bobby,

thanks a lot for your hint. With Clear[x] everything works well now.

Harry



2011/11/28, DrMajorBob <btreat1@austin.rr.com>:
> x was Set equal to 20.05 somehow, so
>
> LinearModelFit[data,{x, x^2, x]
>
> came out as
>
> LinearModelFit[data,{20.05, 402.003}, 20.05]
>
> Notice that
>
> 20.05^2
>
> 402.003
>
> Use Clear[x] or x = . before LinearModelFit.
>
> Bobby
>
> On Mon, 28 Nov 2011 04:54:29 -0600, Harry <hvdosten@gmail.com> wrote:
>
>> Hi out there,
>>
>> I don't understad what happens with my data...
>>
>>
>> There are 401 lines of input data). The last lines are:
>>
>> ...
>>   19.7999992 -9.13599968
>>   19.8500004 -11.6960001
>>   19.8999996 -11.9519997
>>   19.9500008 -12.2080002
>>   20. -12.9759998
>>
>>
>> Importing these data in Mathematica via
>>
>> data = Import["00000.dat", "Table"]
>>
>> and everything seems to be ok. But if I try this:
>>
>> y = LinearModelFit[data, {x, x^2}, x]
>>
>>
>> there is the error message: LinearModelFit::ivar: "{20.05} is not a
>> valid variable"
>>
>> and the output is printed as:
>>
>> ...
>> {19.85, -11.696}, {19.9, -11.952}, {19.95, -12.208}, {20., -12.976}},
>> {20.05, 402.003}, 20.05]
>>
>>
>> Why are the data extended to {20.05, 402.003}, 20.05]?
>>
>> Thanks a lot for your hint. I hope that this question ist not too
>> stupid, but I feel I am standing in front of a wall and don't know how
>> to overcome this...
>>
>> Thanks a lot.
>>
>> Harald
>>
>>
>>
>>
>>
>
>
> --
> DrMajorBob@yahoo.com
>

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web