I've been having a strange problem with Module. Oddly it seems to be linked to my use of Import and then applying a function such as Flatten to my Import. I pasted images of my code and output because there also seems to be an issues with regard to the cells that the code is in. I'm using 64 bit version 10.0.1.0.
Now I apply Flatten to inputData:
Oddly, if I put the statement inputData in the first cell, then everything works.
If I go back to my second set of code, but remove the Module, then again everything works.
The spreadsheet is just 4 rows, as you see in the output. This is simplified from the actual problem I'm working on. It seems that Mathematica is not making the assignment to inputData, but rather somehow keeping it linked to the Import statement until the end of the Module.
Import
function (C:\\Users\\username\\test1.xlsx
). $\endgroup$ – kale Oct 13 '14 at 17:45FullForm@inputData
before the Flatten? $\endgroup$ – Dr. belisarius Oct 13 '14 at 17:47Trace
around thex = Flatten[inputData];
, all values seem to be assigned correctly. Otherwisex
still equalsFlatten[$Failed]
. $\endgroup$ – kale Oct 13 '14 at 17:50