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

9
votes
2answers
3k views

How to get Matlab data imported with the same dimensions?

I have some Matlab image data with the following dimensions (output is from Matlab): >> size(im) ans = 86 86 3 45 The data imports just fine ...
9
votes
2answers
736 views

Exporting data from Excel into Mathematica using clipboard

I know that it's possible to import Excel data into Mathematica using the Import command, as we can see in this post. But some times, I need just to do some fast ...
9
votes
3answers
1k views

Importing HDF5 with compound data

I am looking to Import HDF5 data with compound data. It appears, at least from what I read, that Mathematica 8.0.4 (and previous versions) does not support reading ...
9
votes
1answer
241 views

Wikipedia People only search

I am trying to search people from Wikipedia(For example .*John.* in REGEX). The following query is close, but it isn't generalized like ...
9
votes
3answers
798 views

Is it possible to import dates and times directly as AbsoluteTime and by pass DateLists?

Date and time calculations are quite slow so I am exploring ways to minimize the number of calculations performed. As an example: ...
9
votes
1answer
344 views

Data acquisition from a Measurement Computing USB device

I would like to use Mathematica 9 for to acquire data from a Measurement Computing (MC) USB-201 analog to digital (and other) device for classroom demonstration. I do not have a budget to buy LabView ...
9
votes
2answers
575 views

Import tweets from Twitter

Robert Raguet-Schofield in the Mathematica Blog introduced a way to import tweets from Twitter into Mathematica. I attempted to use this method. I started with this line of code: ...
8
votes
2answers
485 views

How to build a bvh player in Mathematica?

How to build a bvh player that can be used to visualize human motions in Mathematica? Any idea or sample code would be appreciated. ...
8
votes
1answer
176 views

Import the “thumbnail” of an internet page

I have a list of internet sites links from which I would like to automatically recover the page image/thumbnail and page title. Let's suppose that one of the links is https://www.google.com/, I would ...
8
votes
2answers
1k views

Speeding up Import and Export in CSV format

I am handling large numerical data in Mathematica. In smaller problems everything worked fine using Export and Import with the ...
8
votes
2answers
242 views

Problem importing a JCAMP-DX mass spectral file

I have some problems importing a JCAMP-DX EI-mass spectral file using Mathematica 9. For example, if I download the mass spectrum of nonacosane in JCAMP format from NIST, ...
8
votes
3answers
512 views

Import values from tab separated file, change decimal point?

I have files that look like this: ...
8
votes
2answers
188 views

Working with Java hashmaps from Mathematica

I'm using J/Link to access data from an external Java program. The data are represented as a ConcurrentHashMap (see the official specification here). ...
8
votes
4answers
364 views

Exporting data extensions in fits file

Context In Astronomy the de facto standard for images and data is FITS. I would like to export heterogenous data sets into a single fits file. Attempt I am interested in exporting into a fits file ...
8
votes
2answers
332 views

Look up info associated with a given CAS chemical identifier from the NIST webbook & NCI CADD Chemical Identifier Resolver

I would like to retrieve information associated with a given CAS registry number (Chemical Abstracts Service nr) from the NIST webbook web site in Mathematica, using the provided API (e.g. for ...
8
votes
2answers
3k views

Import selected columns from a tab delimited text file

I have a very huge file (1GB) from which I desire to import only the 5th column. It is a tab delimited text file with a .txt extension. Can you please help me with ...
8
votes
1answer
275 views

How to execute JavaScipt on a webpage and then import the result on OSX?

I would like to import data from this page through Mathematica, http://www.oddsportal.com/soccer/netherlands/eredivisie/ . I tried importing through the default Import function ...
8
votes
1answer
474 views

How to properly DumpSave & Get Global`s symbols inside packages while not touching Global context?

For efficiency reasons I prefer to use DumpSave instead of Save. For ease of access I prefer to save symbols in ...
8
votes
0answers
324 views

Import an SPSS, SAS, or STATA file into Mathematica

I would like to import the World Value Survey data file into Mathematica, but it's only given in spss, sas or stata formats, which are statistical analysis softwares format I think. I can't get to ...
7
votes
3answers
288 views

Unencoding encoded URLs in a function

Is there a built-in function for decoding encoded URLs in Mathematica? I would like to convert an encoded URL, for example ...
7
votes
3answers
672 views

Efficient image Import

I have several sets of 20 images I need to import. Each time they have different categories. "Name"<>"Cat"<>"No" Electric B 1 for example. I need to create lists that contain the images ...
7
votes
2answers
785 views

Import Fortran unformatted binary

I have an unformatted binary file generated using the Compaq Visual Fortran compiler (big endian). Here's what the little bit of documentation states about it: The binary file is written in a ...
7
votes
1answer
666 views

Stream CSV files

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

Organizing similar datasets using Contexts or otherwise

I often import several long time series to analyze something about a city. When I have multiple cities, I use contexts. As a simple example, ...
7
votes
1answer
540 views

How to read data from IBM 32-bit floating point binary file ? (not the common IEEE !!!)

I am trying to read a binary file. This file records seismic data. Basically its first 3600 bytes are for the general file information, following are for seismic traces, each begins with 240 bytes for ...
7
votes
2answers
202 views

Why doesn't DumpSave work for elements created within a local notebook context?

I recently noticed that when dealing with notebooks with local context, I cannot successfully DumpSave variables, or, rather, when I call ...
7
votes
1answer
147 views

Creating time-lapse movies with Mathematica

Well, my question is this: Is that possible to make time-lapse movies with Mathematica? Here is some more explanation: Watch this YouTube video that is a wonderful example of time-lapse movies. ...
7
votes
1answer
312 views

How to import a large (~50Mb) json file in mathematica

I am trying to import a 46Mb json file into mathematica (which by the way I exported using mathematica) but its failing with the following messages: ...
7
votes
1answer
340 views

Converting XMLElement objects to plain text

Short version: How can I convert an XMLElement that represents part of a HTML document to plain text? Long version: The more general problem is extracting ...
7
votes
1answer
124 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
1k 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
242 views

Exporting German Umlauts to PDF and importing them doesn't work - character encoding problem

I am using Mathematica 9.0.0.0 under German Windows 32bit. I am on trying to export and import German text to PDF and re-import it. It seems that there is a confusion about the character encoding. It ...
7
votes
1answer
752 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
0answers
212 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
3answers
179 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
621 views

How do I display imported images at actual size?

I know that this is an extremely basic question, but I am having a lot of trouble finding the answer in the documentation. When I import an image (for example, ...
6
votes
3answers
211 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
352 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
278 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
1answer
3k views

How to extract sample values from an imported WAV file?

Suppose I read a file with B = Import["something.wav"] Now how can I obtain a list of sample values?
6
votes
1answer
130 views

Incorrect result with SemanticImport

I might use this incorrectly. I want to use a .csv file that as list looks {{"Group", "data 1", "data 2"}, {"a", 1, 5}, {"a", 2, 3}, {"a", 4, 5}, {"b", 8, 9}} ...
6
votes
1answer
119 views

Understanding `Paste` and how to get a string from the Clipboard to use with `ImportString`

Trying to work on this question I got distracted by my first naive attempt of copying the data and then typing dat = ImportString[Paste[], "Table"] ...
6
votes
3answers
300 views

Skip header lines on import

When importing a data file what are the comment symbols for Mathematica? That is, given a file like this blabla bulbul 1 2 6 54 7 ... .. what symbol do I have ...
6
votes
2answers
751 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
2answers
1k views

Difficulties with Importing PDFs in Mathematica

I am trying to import a group of PDFs that I have downloaded (it is in the realm of 1,000+). They are a group of doctoral dissertations that I'm trying to automatically extract bibliographic ...
6
votes
1answer
175 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
189 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
313 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
113 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
173 views

Assign the contents of a “Copy” operation programmatically to a variable?

While an earlier question Cut and paste data from a spreadsheet nominally addresses the issue, a year has past since its OP asked it and I hope that others have come across simpler or more direct ...