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

35
votes
8answers
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. ...
59
votes
3answers
5k 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 ...
22
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: ...
35
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 ...
25
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 ...
20
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 ...
1
vote
1answer
431 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/ ...
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 ...
21
votes
2answers
2k 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 ...
29
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 ...
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 ...
5
votes
1answer
465 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: ...
22
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 ...
15
votes
4answers
3k 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: ...
18
votes
2answers
577 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
3answers
899 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
660 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, ...
13
votes
3answers
5k 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?
1
vote
3answers
2k 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 ...
21
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 ...
16
votes
1answer
831 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
2answers
804 views

Dealing with large files

I have a *.dat file in which the contents are basically one giant list: {1,2,3,4} {5,6,7,8} {9,10,11,12} and so on. I'd like to read in the first 500 members { ...
14
votes
1answer
794 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 ...
9
votes
3answers
886 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: ...
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?
1
vote
3answers
155 views

How to import files with headers?

R has excellent header supports such as read.table with header options. I don't want to mess up with text-processing or stream-processing. I am looking for a similar tool as in R because it saves a ...
9
votes
2answers
633 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: ...
5
votes
1answer
285 views

Mathematica 10 doesn't support path containing Chinese characters

I tried to import file in Mathematica 10 ( windows 7 system), the path contains some chinese characters. After holding ctrl+shift, and drag the file into front end. I got path like ...
-2
votes
1answer
285 views

Importing a stack of images [closed]

I have a stack of images with the file names C0001996_0000 , C0001996_0001 etc. In total I have $600$ images. I would like to ...
8
votes
4answers
619 views

Import values from tab separated file, change decimal point?

I have files that look like this: ...
5
votes
1answer
492 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
276 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
1answer
580 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 ...
11
votes
2answers
670 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. ...
15
votes
1answer
447 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 ...
9
votes
2answers
783 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 ...
13
votes
2answers
509 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 ...
10
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 ...
7
votes
1answer
209 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 ...
18
votes
1answer
558 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 ...
7
votes
2answers
2k 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
701 views

Stream CSV files

Ram limitations make import impractical for large CSV files. Is it possible to Stream CSV correctly? ...
3
votes
2answers
456 views

video image recognition [closed]

Has anybody experience with video and image recognition? I've made a video of two teams playing soccer. Now I would like to translate each soccer-player to a (x,y) coordinate and follow them during ...
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
399 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: ...
12
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 ...
7
votes
3answers
727 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 ...
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 ...
4
votes
2answers
4k views

Importing from Excel

I'm trying to import a matrix from Excel to Mathematica. My code is: Import["desktop/stproj.xls", "xls", data, 1] The output is some weird stuff about population ...
2
votes
0answers
132 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 ...