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
>