Some interaction in Mathematica 6.0
- To: mathgroup at smc.vnet.net
- Subject: [mg85781] Some interaction in Mathematica 6.0
- From: kishkin <kishkin at gmail.com>
- Date: Fri, 22 Feb 2008 05:00:25 -0500 (EST)
Hello!
Just a little question. Here's some code:
-----------
matrix = Import["C: \\my_file.xls"]; <- import tables
matrix = matrix[[1]] <- we need only the first one and we printing
this table
-----------
What I want to do is insert InputField where I would be able to type a
filename and two lines above will be evaluated automatically.
I think there should be something like this:
-----------
InputField[Dynamic[matrixFile], String];
Dynamic[
matrix = Import[matrixFile];
matrix = matrix[[1]]
]
-----------
This works almost fine. There's a feeling that the output (the one
with the table) re-counts continuously. Nothing changes but processor
is busy. Not good.
I think that the problem is in the second line: matrix = matrix[[1]],
but I do not know exactly what actually causing the problem.
Haven't found anything in the documentation.
Here is the similar example (at least I think it's similar) which
works totally fine:
-----------
x = 1;
y = 2;
Dynamic[
j = {x + y, x + y};
j = j[[1]]
]
-----------
That would be really great if anyone could say something about this
problem.
Thanks in advance,
Mike.