MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Modeling and Array Problem

  • To: mathgroup at
  • Subject: [mg59151] Modeling and Array Problem
  • From: ulenia <ulenia at>
  • Date: Sat, 30 Jul 2005 01:25:34 -0400 (EDT)
  • References: <dbd0pv$2qu$>
  • Sender: owner-wri-mathgroup at


I have some (I am sure) small problems with understanding of array modulation and loops in Mathematica. 
I read i- amount of images ({i,1,Length[list1]} from my work-directory.  I do some calculations in loops, a cause of big amount of images. 

For Example:

Some of parameters I need depends from an image, for example:  a[i] and b[i] or:  

>Do[m1[i]=Dimensions[image[i]][[1]], ],{i,Length[list]}]
>Do[m2[i]=Dimensions[image[i]][[2]], ],{i,Length[list]}]

I am going to do for every matrix-element [[k,l]] of  z[i]:

>Do[z[i][[k,l]]=z[i][[k,l]]/((k*a[i])^2+( k*a[i])^2) ,{k,1,m1[i]},{l,1,m2[i]}, {i,Length[list]-1}]

Unfortunately I get a following error message:

Set : : setps: z[i] in assignment of part is not a symbol
General : : stop : Further output of Set : : setps will be suppressed during this calculation.

I have no idea, what shoul I do. I have done it for separate matrix elements [[1,2]] of matrix i=1::

>z[1][[1,2]]/((1*a[1])^2+( 2*a[1])^2)

I get a very nice result:

>8.59575x10-7 + 1.07787x10-6 i

Why I can not calculate it with do-loop forevery k und l element of  i-amount of matrix?

I would appreciate any help. Thank you very much and have nice weekend.


ulenia at

  • Prev by Date: speed up numerical integration
  • Next by Date: Re: Add terms surrounded by zero together in matrix
  • Previous by thread: Re: Modeling and Array Problem
  • Next by thread: Improper use of slot