MathGroup Archive 2009

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

Search the Archive

Problem in generating a DO cycle (mathematica 6.0)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg95312] Problem in generating a DO cycle (mathematica 6.0)
  • From: "Valeria Volpe" <va.volpe at studenti.unina.it>
  • Date: Thu, 15 Jan 2009 06:10:52 -0500 (EST)

Dear all I have a problem in generating a DO cycle (mathematica 6.0).

Through these commands I acquire a bitmap image from a my folder and create
a "Graylevels" file:

Quit;
SetDirectory[ "C:\\Users\\...\\Dati\\\Bitmap\\\xxx"];
nome = "p6a.bmp";
Import[nome, "ImageSize"];
row = ToExpression[Import[nome, "ImageSize"]][[1]];
col = ToExpression[Import[nome, "ImageSize"]][[2]];
vmax = row*col;
gv = Array[f, vmax];
gl = Import[nome, "GrayLevels"];


at this point I have a matrix with all graylevels.

Now my problem is to create a two DO cycle (one for rows and one for
columns) which allow me to generate an array (gv) whose elements are the
product row x column of the matrix:

gv[i] = gl [j,k]

where:
{i,1,Vmax}
{j,1,row}
{k,1,col}

Can you pleasa herlp me to generate these Do Cycle?

Thanky
Vale



  • Prev by Date: Re: NEWBIE QUESTION - How to create a barchart with two data sets.
  • Next by Date: Re: passing initial point to LinearProgramming
  • Previous by thread: Re: Mathematica and Access
  • Next by thread: Re: Problem in generating a DO cycle (mathematica 6.0)