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


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

Re: variable amount of Interpolation points

Started byBob Hanlon <hanlonr357@gmail.com>
First post2011-12-17 07:41 +0000
Last post2011-12-17 07:41 +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: variable amount of Interpolation points Bob Hanlon <hanlonr357@gmail.com> - 2011-12-17 07:41 +0000

#7292 — Re: variable amount of Interpolation points

FromBob Hanlon <hanlonr357@gmail.com>
Date2011-12-17 07:41 +0000
SubjectRe: variable amount of Interpolation points
Message-ID<jchh35$iar$1@smc.vnet.net>
>From the documentation for For: "Unless an explicit Return is used,
the value returned by For is Null."

{For[i=0,i<4,i++,{i,2 i}]}

{Null}

For[i=0;list={},i<4,i++,AppendTo[list,{i,2 i}]];list

{{0,0},{1,2},{2,4},{3,6}}

Interpolation[For[i=0;list={},i<4,i++,AppendTo[list,{i,2 i}]];list]

InterpolatingFunction[{{0,3}},<>]

Table would be much simpler

Interpolation[Table[{i,2i},{i,0,3}]]

InterpolatingFunction[{{0,3}},<>]

%==%%

True


Bob Hanlon

On Fri, Dec 16, 2011 at 5:53 AM, Konny
<konstantinweixelbaum@googlemail.com> wrote:
> Is there a way to iterate inside an interpolation??
>
> I am thinking to make the amount of interpolation points variable.
>
> I tried this, but had no luck
>
> Interpolation[{For[i = 0, i < 4, i++, {i, 2 i}]}]
>
> Thanks in advance for any help!
>

[toc] | [standalone]


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


csiph-web