MathGroup Archive 2008

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

Search the Archive

Import , MatrixPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85026] Import , MatrixPlot
  • From: bhagatlal at gmail.com
  • Date: Thu, 24 Jan 2008 04:46:10 -0500 (EST)

Hi
I have a number of data files named 1, 2, 3, ... 10, 11, ..... etc.
(without any extension)
When I MatrixPlot using

MatrixPlot[Import["1", "Table"]]
or
MatrixPlot[Import["2", "Table"]]
or
MatrixPlot[Import["3", "Table"]] ........... etc.

it works fine. But when a have a number of files it is a very tedious
job to type in the command every time.
So, I opted for a "for loop"...... as

For[k = 1, k < 4, k = k + 1,  Print[MatrixPlot[Import["k", "Table"]];
Print[k]]]

and the output is.........
"
Import::nffil: File not found during Import[k,{Table}]. >>

MatrixPlot::mat0: Argument $Failed at position 1 is not a matrix. >>

1

Null
" .....etc.
How to solve the problem...  may be that "Import["k", "Table"]" takes
"k" as string or something like that...
Please HELP me.................

with regards
Bhagat Lal Dutta
bhagatlal at gmail.com


  • Prev by Date: Re: How remove CellChangeTimes values?
  • Next by Date: Re: List complement operator
  • Previous by thread: Re: vector differentiation by looping in Mathematica
  • Next by thread: Re: Import , MatrixPlot