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

2
votes
2answers
56 views

How to prevent conversion of number forms to numbers in Import [ webpage, “Data” ]?

I have tabular data on a webpage. It looks like this: Import["http://mfvonh.me/numericalTable.html", "Plaintext"] 1.0 1.1 3.53 However, I have ...
0
votes
1answer
53 views

Importing colors from file

I just tried something straightforward (for me): ...
0
votes
1answer
45 views

Importing a Matrix whit different column numbers depending on the row

I have a bunch of coordinates given in a file. The file contains Startpoints and Endpoints of arrows in columns(Example): ...
2
votes
2answers
123 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 ...
3
votes
1answer
59 views

Order imported files by their alteration date

Probably a very easy question, but I could not find the answer, so it would be very nice if you can help me: Let us say I have 10 files, all with the extension ...
3
votes
1answer
131 views

How can I recover the source code from cdf file?

by a mistake I have deleted the nb file by which the CDF was generated. All required definitions were in one cell. If I remember the code looked like this: ...
6
votes
1answer
110 views

Can I read Chinese characters with ReadList correctly?

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

How to import a CSV file into column vectors [closed]

I just got a trial version of Mathematica. I want to experiment with using it for data analysis. I have a CSV file here that I would like to import into Mathematica so that the data is represented as ...
-1
votes
1answer
60 views

How to draw a network from a dataset reporting the labels of nodes of every link?

I have a dataset in format .txt of a directed network, containing a matrix A of dimension ...
0
votes
1answer
63 views

Importing a text file into a matrix format

I am attempting to perform a comparison of pseudorandom number generation with the RAND Corporation's "A Million Random Digits with 100,000 Normal Deviates" for a Computational Physics course. I have ...
0
votes
1answer
54 views

How should my data be formatted for use with BetweennessCentrality?

A few weeks ago I asked this question. I am trying to upload my data which is an adjacency list for an undirected, unweighed graph and find the betweenness centrality. At the time I tried to use the ...
1
vote
1answer
64 views

Importing adjacency matrix from file of 0/1 arrays

Is it possible to import adjacency matrix for graph representation, from simple text file with NxN (rows x columns) of 0s/1s: 0 1 0 0 1 0 1 1 0 1 0 0 0 1 0 0
1
vote
1answer
117 views

Import CSV with “Numeric”->True and “DateStringFormat” problem

The CSV file linked below has 3 columns: "PT_ID" (char 4), "PHYS_ID" (char 2) and "VISIT_START_TIME" (varchar eg "0:00:15" hours minutes seconds) ...
3
votes
1answer
138 views

Plotting with ColorFunction -> GrayLevel - no black

This is probably a fairly trivial question, yet I have been unable to find an answer - help would be much appreciated! :) I am trying to plot a 28 x 28 matrix (tabulated data given here), containing ...
0
votes
0answers
31 views

Import .dat table but losing decimals [duplicate]

Data, tab-delimited: 230534.552 0.002804 230534.674 -0.016347 230534.796 -0.016737 230534.918 0.013062 230535.041 -0.0033244 230535.163 0.023205 I run arr = ...
2
votes
1answer
112 views

Text analysis and loops

I need a loop for a text analysis involving about 1000 papers (identical structure of all papers) I have these two commands to read all the papers into memory. ...
1
vote
0answers
85 views

InstallJava::fail error when importing an image with a Raspberry Pi

I'm trying to import an image in Mathematica on my Raspberry Pi. The code is simple but I get an error when importing: ...
0
votes
1answer
114 views

How do I upload a graph as an adjacency list and find the betweenness centrality?

I have an undirected simple graph in a .txt file formatted as an adjacency list like this: 100 200 200 300 300 400 500 600 700 800 900 ... Every number is a node ...
2
votes
1answer
170 views

Importing data from excel and assigning a variable to each of its columns

How should I assign variables to the data imported from excel containing 3 columns which are time, mean and standard deviation. I want to perform operations on the three variables to get new ...
0
votes
2answers
48 views

How can I troubleshoot a PDF that fails to import?

I'm trying to import a PDF file whose text I'd like to parse, but I'm getting an error with no explanation: ...
3
votes
2answers
156 views

Import multiple files from folder in order of date added

I have a folder that contains certain files I want to import. In my case those are .png files. As all the files I want to import contain the phrase "accum" in their filenames, I can use ...
0
votes
0answers
56 views

How to save all data in all variables in context different than “global”?

I have seen questions on saving data on "global" context. Now if I set my notebook's evaluation context "unique to this notebook". the global context doesn't work quite well. Any idea what should i do ...
0
votes
0answers
26 views

relative directory paths within a mathematica package/what directory does a mathematica package see as local? [duplicate]

I have a package that gets loaded in many notebooks I use, with Import[pathToLibraryDirectory<> "toolkit.m"]; This toolkit in turn loads some Excel ...
9
votes
1answer
234 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 ...
1
vote
2answers
91 views
7
votes
1answer
295 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: ...
2
votes
1answer
103 views

Importing web page data

I tried importing a webpage using Import: ...
1
vote
1answer
47 views

ReadList error with negative very small numbers

When I try to import data with ReadList from a file containing very small numbers (~10^-318), positive data is handled well, ...
2
votes
1answer
137 views

ReadList with header and foot lines

I want to do some large data analysis, and i want to be able to import files in a fast way. I tried Import, but it is quite slow; ReadList takes half the time. This is the code I was using: ...
0
votes
1answer
111 views

Importing data to make a DateListPlot

I am having a hard time trying to import some text data for later use in DateListPlot. My first field in my data is a date of the format "yyyymmdd". I tried to ...
3
votes
2answers
190 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 ...
8
votes
4answers
356 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 ...
0
votes
1answer
55 views

Importing and manipulating data in HDF format

I have two matrices A1 and A2 in HDF format. I use the following code to import them. ...
2
votes
1answer
151 views

Saving a graph of a great number of nodes

I'm developing a code where I get graphs with over 10K nodes. These graphs have a particular relationship between clustering and degree that I need to save for future analysis. The problem is when I ...
1
vote
1answer
94 views

Extracting Imported Information

What I want to do is to compare the relationship between the consumption of say beer and wine using scatter plots where each point designates the particular country (preferably named). I have tried to ...
3
votes
1answer
97 views

Import YAML file into Mathematica

Has anyone implemented the import of YAML data files into Mathematica? I suppose some sort of transformation into a nested list of rules would be the way to do it. Thanks
0
votes
1answer
170 views

Import invocation fails with Get::noopen : Cannot open JLink error

The following function call fails when I invoke it in a fresh Mathematica session: ...
1
vote
1answer
67 views

Using imported data in further calculations

I have quite a lot of data in an Excel file, which I have to use in further calculations. The transformation should map a data point with thre coordinates into a two coordinate result. Example: ...
1
vote
2answers
129 views

Problems with importing a .txt file

I have some problems with importing a .txt file as a table. This is the file. I tried importing it with data = Import["data.txt", "Data"] I want to access ...
3
votes
2answers
101 views

Importing multiple tables within a single file

Suppose I have a file with multiple tables, each separated by a line beak, like this: ...
8
votes
2answers
183 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). ...
4
votes
1answer
420 views

Import Large Excel File

Currently, I am working on a large time series dataset, which contains 928,586 rows and 35 time intervals in columns, in excel format (.xlsx) and using Import to ...
3
votes
1answer
106 views

Reading many single files and creating numbered (? or indexed) variable

I tried many different approaches, but I could not solve the following problems, I appreciate your help: What is the best way to read many data files? I mean we have ...
2
votes
2answers
157 views

How to read non-standard-format data into Mathematica from a file

I would like to read non-standard-format data into Mathematica from a file. How can this be achieved? For example, how can I read the following text file of data into Mathematica: ...
0
votes
1answer
189 views

Transforming an image as an object

The problem is following: I have a following animation: ...
6
votes
1answer
168 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 ...
4
votes
3answers
187 views

Reading binary strings from file as strings

I have a file that contains binary strings like 01011 00101 01011 I want to import the file to Mathematica as a list of strings, but ...
0
votes
1answer
197 views

How to work with 3D images of STL format

After importing a 3D image of STL format, my possibilities in regard to "3D Volumetric Image Processing" seems rather limited. All examples are given with TIFF files. Is there a way to convert from ...
9
votes
1answer
322 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 ...
-2
votes
1answer
123 views

Data is imported as string instead of numbers [closed]

newdata = Import["data.txt", "TSV"]; ListPlot[newdata] My data.txt file consists of two columns of numbers, separated by ...