Questions about getting data, files, images etc. from various formats into a form that can be read, tranformed and manipulated by Mathematica

learn more… | top users | synonyms

7
votes
1answer
2k views

Import DCD (CHARMM/NAMD binary trajectory) file

How can one import the coordinates stored in a binary CHARMM/NAMD DCD file? This is the structure of the file: ...
7
votes
1answer
864 views

Import file from FTP site

I would like to Import files from an FTP site. The code below works on a test site: file = Import["ftp://test:test@ftp.secureftp-test.com/pigs.xml"]; But when I ...
7
votes
1answer
141 views

Using Differences on data: trouble with floats and doubles

Consider the following data set (after I have run FullForm), which is imported from a file (stored typically as 10.040): ...
7
votes
1answer
335 views

ReadList can't read correctly

Bug introduced in 9.0 and fixed in 9.0.1 I'm trying to load some data into Mathematica from some files generated by fortran. But ReadList seems can't get the number correct. Here is a simplified ...
7
votes
0answers
308 views

What are the known differences between Save and DumpSave, and how to account for them?

Edit: I changed the title and (slightly) the wording of this question in order to make it more easily answerable. If I evaluate this in Mathematica 9: ...
6
votes
2answers
259 views

Why an extra { when importing .xls?

I am trying to import data from a file. If I import a CVS file, I get: {{a,b,c},{e,f,g}}. For example, two curly brackets. If importing from a .xlsx file I get ...
6
votes
3answers
190 views

Is it possible to Import urls not type “”

These days I often copy urls from Internet Explorer's address bar. When I paste the url into a Mathematica cell it is neither a string nor a expression. ...
6
votes
2answers
839 views

Why does importing a URL fail the second time and produce a FetchURL::conopen error?

I have Mathematica code that uses Import[] to download URLs. I noticed that first time I use the Import[] command it works. ...
6
votes
2answers
323 views

How to process binary-encoded data without writing to file and importing?

I am consuming a webservice through NETLink that returns data directly in the response as a gzipped csv file. I can successfully process the data like this: ...
6
votes
3answers
235 views

How can I read in specific information from a TeX-file?

I have several TeX-files and they contain information of the form ...
6
votes
2answers
144 views

Import data from excel and store it permanently in notebook

I am trying to write the code for doing the following: by clicking a button, import specific data from an Excel file which I select through a dialog window; input a name for the imported data set ...
6
votes
2answers
530 views

How to show wireframes on imported Object / Mesh (.obj file)

I've managed to import a Wavefront (.obj) file and store it in a variable like so: ...
6
votes
2answers
902 views

How can I open an Excel file and modify it in Mathematica?

I wanted to ask how can I view an Excel file from a Mathematica notebook and modify it. I have seen a similar question, Open Excel file with Mathematica, but the answer involves .NET. Is there any ...
6
votes
1answer
803 views

Stream CSV files

Ram limitations make import impractical for large CSV files. Is it possible to Stream CSV correctly? ...
6
votes
1answer
206 views

Mathematica doesn't read .mat file

To be honest, I don't know if the problem is with Mathematica, or with the file; it's been generated by PicoScope, a PC-based oscilloscope software, not Matlab. The error I get in Mathematica 9 when I ...
6
votes
1answer
239 views

Importing images from the web using ImportString & URLFetch

I can bring images from the web using the Import command like this: Import["http://blog.wolfram.com/wp-content/uploads/2008/06/se-30.jpg"] Sometimes the web ...
6
votes
3answers
193 views

Organizing similar datasets using DownValues instead of Contexts

In his answer to this question, Leonid helped me find a way to programmatically generate contexts for holding sets of symbols with the same names. Perhaps a simpler way is to use ...
6
votes
1answer
408 views

Operations on online files via public URL access

I need Mathematica to access an online public directory via some URL (fake in this case) http://example.com/images and perform operations similar to those Mathematica can do on OS directories and ...
6
votes
1answer
148 views

Can I read Chinese characters with ReadList correctly?

Just try this example: Export["a.txt", "这乱码问题该怎么解决呢\n***\n怎么解决嘛"] ReadList["a.txt", Record] ...
6
votes
1answer
650 views

Import numeric values from XML

I am trying to import data from an XML file and then perform calculations on those numeric values. When I import the data the values seem to be stored as strings. I tried using a ToExpression ...
6
votes
1answer
1k views

When do I use Mathematica, when do I use Gephi, and how do I use them together?

Mathematica has great operations for analyzing graphs but when the graphs are a bit bigger, Gephi seems to be more efficient (at least on my computer) at drawing and analyzing, i.e. visualizing the ...
6
votes
1answer
224 views

Reading specific entries from a CSV file

This question is related to the following: Speeding up Import and Export in CSV format Stream CSV files Reading periodic elements from a large file I have a set of very large CSV files (a few ...
6
votes
1answer
481 views

Accessing data on local machine from remote kernel

I have a remote kernel on a server that I would like to use to process some data. The connection works, i.e, I'm able to use the local front end and the remote kernel. However, I cannot figure out how ...
6
votes
2answers
729 views

Trying to extract information from an MDB file. Import is too slow

I am running a Linux box and as usual the documentation for this type of box is not great. I am trying to open up and extract and possibly include later on information from a "mdb" file. The file ...
6
votes
1answer
333 views

ESRI shape files

ESRI shape files (shp): importing the polygon data can yield a very large list. It is computationally intensive rendering the polygon. I have been trying to convert to ...
6
votes
1answer
56 views

Importing hex values from a text file

This question appeared maybe an hour ago, but was removed by OP. I'm still interested in a solution. Suppose we have a text file with hex numbers separated by tabs (or spaces): ...
6
votes
1answer
433 views

Importing DICOM images

When I try to Import individual DICOM (.dcm) files from http://www.osirix-viewer.com/datasets/ datasets I can see the Elements listed in example files, ie: ...
6
votes
0answers
53 views

How to connect to a video stream?

Is there a way to get a current frame from video streams (especially from RTSP streams)? I would like to connect to a camera in my local network and get a snapshot from it to do some further ...
5
votes
4answers
885 views

How can I get rid of extra commas in Export/Import?

Consider the following example of trying to export the following table: Export["test.dat", {{{1, 1}, {2, 2}}, {{3, 3}, {4, 4}}}, "Table"]; Now I import to see ...
5
votes
2answers
513 views

How to test if file exists and stop

At the moment I'm using > ...
5
votes
4answers
2k views

Numerical Differentiation using 1500 data points

I have a set of 1500 data points (which are some energy eigenvalues) corresponding to a parameter H0 (which represents magnetic field. H0 values are equispaced going from $-3.0$ to $3.0$ in steps of ...
5
votes
1answer
562 views

Failing to import an .eps file

I have an .eps file which was created using GLE. There is nothing wrong with the file, GS View can read it correctly. However, when I use Mathematica to read it using ...
5
votes
3answers
586 views

How do I save/export a list so that it can later be easily imported as a list again?

I have a couple of big lists (each of them contains elements that are themselves lists of two elements, i.e. an element of each list that I have is of the form {x, y}) that I want to save/export. ...
5
votes
2answers
466 views

How to import a “.numbers” spreadsheet?

Does Mathematica support importing a ".numbers" spreadsheet file (from the "Numbers" '09 (ver. 2.3 554) spreadsheet program in Apple's OS X iWork office suite)? A ".numbers" file is actually a zip ...
5
votes
2answers
2k views

Converting numbers to integers

I've read the available documentation but I still haven't found an NumberForm -> Integer function yet. No result in this site's search, either. Does it exist? ...
5
votes
1answer
175 views

How to use Get on a folder

In the documentation for Get it says: If the file found by <<name is a directory, the Wolfram Language will try to ...
5
votes
1answer
221 views

How can I read compressed .Z file automatically by Mathematica?

When I read .Z file by something like jpldatstring = Import["ftp://cddis.gsfc.nasa.gov/products/jpl/2003/jplg0040.04i.Z"] Unfortunately, it turned out that ...
5
votes
1answer
151 views

Tools for Importing/working with SEED seismographic data in Mathematica?

Do you know if exist a library or a package in order to import and work with SEED Seismographic data in Mathematica?
5
votes
1answer
343 views

windrose with data from Excel

How to Import data from excel and use them to Plot windrose instead? Example, {{Strength, Angle(degrees)}..} ...
5
votes
1answer
413 views

How can I log in to my Wikipedia account and access my watch list?

Wikipedia's "Edit Watchlist" page (for logged in users) has a list of hyperlinks to the user's watchlist (here is an example from my account). I've tried to use ...
5
votes
2answers
287 views

Sorting a large file

I have some huge logs, which are text files, containing up to a million rows each, and I need them sorted. Because trying to import one obviously makes Mathematica run out of memory, we must rule out ...
5
votes
2answers
2k views

When importing is it possible to set the delimiter?

When importing a csv file is there a way to set the delimiter. I have a csv that uses ";" as its delimiter. I tried ...
5
votes
1answer
575 views

Open data file from CDFPlayer?

Using a CDF program running in CDF Player, is it possible to use a system dialog box, or even just an Import statement such as Import["*.CSV"], to import data from a text or comma separated file on a ...
5
votes
1answer
155 views

HDF5 and complex numbers

I "Export" an array with complex numbers with HDF5 format. When I "Import" it, I only get the real part. Simple example: ...
5
votes
2answers
346 views

SemanticImport mis-interprets CSV

SemanticImport misinterprets rows with trailing blanks. Note the commas in the 2nd column: ...
5
votes
1answer
914 views

Importing specific elements from JSON

I'm having trouble importing JSON in the way I expect, based on my reading of the documentation. The particular issue I'm having is with importing a specific element, or list of elements. From the ...
5
votes
1answer
122 views

Why can't an `Import[]` change $Path?

Does anyone know why Import["http://**server**/file.m"] can't make a change to $Path? It seems like ...
5
votes
1answer
2k views

Combine multiple PDF files into one document

I have multiple single page PDFs I'd like to join together into a single file. (Obviously I mean the file format and not the probability distributions here!) I'm aware of free online services such as ...
5
votes
1answer
819 views

Efficiently exporting many images as a video

I have many .gif images and I would like to export them as a single video file (I prefer .mov, but any video format is fine). But what if I have several tens of megabytes of .gif images? Is it ...
5
votes
1answer
588 views

ReadList can't read from file containing high-precision Reals

I want to read a file which contains seven columns of real numbers. Mathematica seems to have a problem with the high precision I need. My code: ...