diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2010-10-04 14:42:51 +0200 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2010-10-04 14:42:51 +0200 |
commit | b851fa7a46d47fd8d66a74dedd1308eef03be902 (patch) | |
tree | beb34311bc7b8eb399a0275fd473cd023c06e563 /Auxiliary | |
parent | d9cfd88e475280d2f1a6d6a3dbc7ce6d04a91a00 (diff) |
IOASCII.m: Make functions flexible so they can accept either data or filename
Diffstat (limited to 'Auxiliary')
-rw-r--r-- | Auxiliary/Cactus/IOASCII.m | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Auxiliary/Cactus/IOASCII.m b/Auxiliary/Cactus/IOASCII.m index 85de605..118db8d 100644 --- a/Auxiliary/Cactus/IOASCII.m +++ b/Auxiliary/Cactus/IOASCII.m @@ -12,8 +12,12 @@ ReadIOASCII[file_] := data2 = Select[SplitBy[data1, Length[#] == 0 &], #[[1]] != {} &]; data3 = Map[{First[#][[3]], Drop[#, 1]} &, data2]]; -MGraph[file_] := +MGraph[file_String] := Module[{data = ReadIOASCII[file]}, + MGraph[data]]; + +MGraph[data_List] := + Module[{}, Manipulate[ ListLinePlot[data[[it, 2]], PlotLabel -> data[[it, 1]]], {{it,1,"it"}, 1, Length[data], 1}]]; |