Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #13230 > unrolled thread
| Started by | Nigel King <nigel.king@cambiumnetworks.com> |
|---|---|
| First post | 2013-01-21 05:06 +0000 |
| Last post | 2013-01-21 05:06 +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.
Re: problem with append Nigel King <nigel.king@cambiumnetworks.com> - 2013-01-21 05:06 +0000
| From | Nigel King <nigel.king@cambiumnetworks.com> |
|---|---|
| Date | 2013-01-21 05:06 +0000 |
| Subject | Re: problem with append |
| Message-ID | <kdiibv$nbe$1@smc.vnet.net> |
Hi Paolo,
I think that you have two errors.
The first is that AppendTo has a capital T
The second is that you need to initialise rr outside the loops. It seems that rr={} inside the AppendTo function is applying the initialisation after the Append
rr={};
For[a = 2, a < 6, a++,
For[b = 2, b < 6, b++,
AppendTo[rr, a^b]]]
rr
Nigel King
On 20 Jan 2013, at 06:21, Paolo cachecho <paolocach@gmail.com>
wrote:
For[a = 2, a < 6, a++,
For[b = 2, b < 6, b++,
Appendto[rr = {}, a^b]]]
rr
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web