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