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

28
votes
5answers
4k views

How do you convert a string containing a number in C scientific notation to a Mathematica number?

Suppose I have a string containing the C-representation of a floating point number, for example s = "1.23e-5" and I want to convert this to a Mathematica number. ...
49
votes
3answers
4k views

Recovering data points from an image

Unfortunately, some data can only be obtained in picture form (Japanese publications anyone?). Since this cannot be worked with, it has to be converted to a dataset that can; I was wondering whether ...
20
votes
3answers
1k views

Reading periodic elements from a large file

I have a large binary data file (big endian) with 100+ million "rows" of 11 elements, combination of floats and integers. This is the format: ...
31
votes
5answers
4k views

How can I extract data points from a black and white image?

Consider the following graph (source): Is there any way to extract the data points from this image in a semi-automatic way? I have seen, and tried the methods suggested in this question, but they ...
24
votes
3answers
2k views

How to read data file quickly?

I have a tab separated value file with 10 million rows each of which has three tab separated values. The first value is a string, the second an integer, and the third another string. How to read ...
1
vote
1answer
411 views

How can I speed up image importing? [closed]

The following examples show how slow it is to load a simple GIF. Can anything be done to make it faster? System #1: Mathematica 8.0.1.0, HP notebook, Win7 64Bit, 2 x 2.4Ghz Intel Core i5, 2GB RAM, w/ ...
17
votes
2answers
2k views

How to import all files of a folder at once?

I know how to import one textfile by calling its name filestring = Import["myfile.tex", "Text"]; Then "filestring" is a string with the myfile content. How do ...
19
votes
2answers
1k views

Extracting values from nested rules in JSON data

I have been using Mathematica to analyse some data from the StackExchange API. It is conveniently available in JSON form, which Mathematica interprets as replacement rules. However, some of the rules ...
7
votes
2answers
888 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 ...
16
votes
2answers
512 views

How to develop an Import/Export converter for Compress[]ed data?

Mathematica has a cross platform data exchange format, WDX. Unfortunately importing or exporting large data from/to WDX is very slow. Using MX files is very fast, but they are not compatible across ...
13
votes
4answers
2k views

Cut and paste data from a spreadsheet

I have a set of data points in two columns in a spreadsheet (OpenOffice Calc): I would like to get these into Mathematica in this format: ...
13
votes
3answers
759 views

How to scrape the headlines from New York Times and Wall Street Journal?

How to scrape headlines from New York Times, Wall Street Journal main pages to create datasets similar to this service? Importing HTML from nyt.com (HTML4) results in a ...
6
votes
2answers
566 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, ...
11
votes
3answers
4k views

Plot data from txt file?

I have data in file.txt which can be expressed by 20000x11 matrix. I do not want to import all of these data. How can I plot graph of the column 1 & column 4?
28
votes
4answers
2k views

Importing videos in Mathematica

Mathematica's Import command is purportedly able to import .AVI files. However, I find that many files that I want to import do only result in MMA showing a blank ...
19
votes
2answers
1k views

How to manipulate web pages on Mathematica?

I wanted to input some data on this page through Mathematica: http://www.fundamentus.com.br/buscaavancada.php Then I would press the "buscar" button also through mathematica coding and get the ...
16
votes
3answers
1k views

Is it possible to use Mathematica to record sound and/or vision?

I think the title says it all. I know about ImageCapture which seems to capture stills. Can ImageCapture be made to capture a ...
16
votes
1answer
714 views

Slow import of multigigabyte TIF image stacks

Update 6: After contacting Wolfram Technical Support, I was advised that the frame-to-frame import timing variability can be eliminated by reading in the frame stack from frame to frame with the ...
14
votes
1answer
690 views

Release the web camera after using CurrentImage[]

CurrentImage[] will capture an image from the webcam. It is even possible to create a live video in the notebook using ...
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?
9
votes
2answers
491 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: ...
3
votes
1answer
349 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: ...
5
votes
1answer
409 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 ...
3
votes
1answer
240 views

Exporting lists to files

I am trying to write a program which will generate a list of objects and then exports it in a separate file and clears its memory. As an example I tried the following ...
1
vote
3answers
1k views

Importing multiple files using a for-loop

once again I am stuck solving a seemingly easy problem :( I would like to make a List of tables by importing data from several txt-Files. Importing the data into a table works so far and I am able to ...
1
vote
1answer
483 views

Import Excel sheet into 3D array?

I have an excel spreadsheet that I would like to plot in a 3D graph using mathematica. The X and Y values are the location of the cell, and the Z value is the number of the scale. How can I import ...
19
votes
2answers
2k views

How to save all data in all variables so that loading it is fast?

I've got this CSV file I've imported that has tens of millions of lines in it. It takes around 20 minutes to import. I've been working with it for a while and have the processed data spread out in a ...
15
votes
1answer
422 views

Gravatars/identicons with Mathematica

The default avatar/identicon is based on an MD5 hash of your e-mail address. With some e-mail providers (e.g., GMail) the address gmailuser+foo@gmail.com is still ...
12
votes
2answers
463 views

How to monitor the progress of Read?

I use f = OpenRead["largefile.m"] x = Read[f]; Close[f]; to read in a Mathematica expression from a large file largefile.m ...
16
votes
1answer
497 views

When importing GIF animation, how to find the correct list of “DisplayDurations”?

When importing GIF animations with variable frame durations, the settings for "DisplayDurations" are not recovered correctly. As an example, I'm using the movie from this earlier question: Here I'm ...
9
votes
2answers
2k 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 ...
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 ...
3
votes
2answers
1k views

Importing .txt or .csv financial data

I am trying to import some financial data exported from Excel. You can find the relevant file here : Text File or CSV File This is what the data looks like in Excel : Using the following code to ...
15
votes
1answer
355 views

Importing Zip files

Mathematica can import zipped files automatically, but when the content of the zip file it's another zipped file, I just get the list of files in the second zip: ...
11
votes
6answers
2k views

How do you skip missing data values in a data file?

In scanning through a simple imported file of weather station data, some dates have missing data. What is a test to use to check whether a datum is valid? I tried ...
9
votes
3answers
740 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: ...
5
votes
1answer
1k 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 ...
1
vote
1answer
616 views

How to set path of IMPORT from excel into Mathematica?

I was able to IMPORT from excel data at the start of my project when both the .nb and EXCEL XLS files were sitting in MyDocument (or some other location), but upon moving both files into my Dropbox ...
4
votes
1answer
238 views

How can I colorize an imported model?

How can I colorize an imported model from for example 3ds max? I'm trying to find the way to colorize a 3D plot from an imported model with something like this: ...
3
votes
1answer
610 views

How do I read a CSV file and remove comments from it

I have very recently started using Mathematica 9.0 Home Edition and am trying to understand it as best I can so please be tolerant ;). I have a file of data (sugar.csv) which contains blood sugar ...
3
votes
1answer
340 views

Running external pdflatex command and importing the generated PDF document

There have been a couple of questions about incorporating labels and equations that were typeset in $\LaTeX$ into a Mathematica notebook. Ideally, this requires running ...
2
votes
2answers
112 views

Animation of moving rectangles in 2D from data file

I am not very familiar with mathematica but I know the basics so I thought I give it a try. For a project I have to animate rectangles moving around in 2D (later also 3D). The data come from a C ...
2
votes
4answers
1k views

Plotting a large number of data points

I would like to know how to plot when I have a large number of points (arround 600) in a specific format: ...
1
vote
0answers
107 views

Errors importing UTF8 file to mathematica

I'm trying to import this file: Import["https://dl.dropboxusercontent.com/u/35192406/jarlaxxe_tweets.\ csv", CharacterEncoding -> "UTF8"] But I am getting ...
1
vote
1answer
319 views

Making a ListVectorPlot3D from data in an external file

I have a .dat file with six columns: {x y z vx vy vz}, where x, y, z are space coordinates and vx, vy, vz are the vector components. How can I use this file to get ...
0
votes
1answer
178 views

Transforming an image as an object

The problem is following: I have a following animation: ...
0
votes
2answers
202 views

Import large amount of data with time stamps

I have a large data file (150 000 lines) which I want to import in Mathematica. The first few lines look like this ...
26
votes
3answers
1k views

How to do http POST in Mathematica?

The Import command lets you do a HTTP GET from a URL, like this Import @ "http://merkosoncampus.com/wp-content/uploads/2011/05/higgs-boson.jpg" This sends an ...
19
votes
2answers
638 views

Why does ImageData need four times more memory?

Background We are dealing with very large TIFF image files that are imported, processed and exported using Mathematica 9.0.1. Many of our algorithms only work with an array representation of the ...
22
votes
1answer
2k views

Programmatically retrieving e-mails from a remote server

Mathematica has a function for sending mail (SendMail) and can import the MBOX format. But what I'd like to do is ...