I export a simple CSV file created in MATLAB with complex numbers, such as:
0.1+2.1i,0.9+0.13i,0.02+0.3i
I would like to import it into Mathematica with the "i" recognized as the imaginary unit, of course. Unfortunately, a simple Import["filename"] command does not work, and neither does Import["filename","CSV"]. I have also tried the solution method proposed here, but unfortunately without success.
How can I do it?
PS: Following Bill's suggestion, here is the output from InputForm
:
{{"0.1+2.1i", "0.9+0.13i", "0.02+0.3i"}}
InputForm[Import["filename"]]
and put that on a single line by itself with four spaces in front of it so Stackexchange will understand that line is code and to do less "desktop publishing" on it before we get to see it. That will hopefully show people here exactly what Mathematica is getting from your file import and then people can try writing a line of code to fix it for you $\endgroup$