MathGroup Archive 2008

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

Search the Archive

Re: Import , MatrixPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85150] Re: Import , MatrixPlot
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 30 Jan 2008 06:08:53 -0500 (EST)
  • References: <fne31b$5lf$1@smc.vnet.net>

Hi,

and what does

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

??

Regards
   Jens

bhagatlal at gmail.com wrote:
> 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: Filled Polar plots
  • Next by Date: Re: Text XY-size control in 2D graphics?
  • Previous by thread: Import , MatrixPlot
  • Next by thread: ColorFunction question - DensityPlot and ContourPlot difference