Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #15896 > unrolled thread
| Started by | David Annetts <david.annetts@iinet.net.au> |
|---|---|
| First post | 2011-01-30 08:31 +0000 |
| Last post | 2011-01-30 08:31 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Re: loops in mathematica David Annetts <david.annetts@iinet.net.au> - 2011-01-30 08:31 +0000
| From | David Annetts <david.annetts@iinet.net.au> |
|---|---|
| Date | 2011-01-30 08:31 +0000 |
| Subject | Re: loops in mathematica |
| Message-ID | <ii37lf$408$1@smc.vnet.net> |
Hi Isabella, Why not just write alpha[sigma[#]]& /@ Range[100];(*?*) Might even be quicker than a loop... D On 30/01/2011 08:43, Isabella Blengini wrote: > I have a problem with a loop that I would like to write in Mathematica. > > I have a function sigma that changes with i. > and I have a function alpha that changes with sigma. > > Imagining that i goes from 1 to 100, in another system I would write something like: > > sigma=zeros(100,1); > > alpha=zeros(100,1); > > > > > > for i=1:100; > > sigma(i,1)=some function of i; > > end > > > for i=1:100; > > alpha(i,1)=some function of sigma(i,1); > > end > > > and I would get 2 vectors (100,1). > > > Please let me know if you can help me > > > MANY THAnks, > > isabella
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web