Questions tagged [import]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
32 views

How to import files from a directory above the notebook directory?

Consider some directory .../a/ where ... may be some arbitrary path. It has two subdirectories: /a/b/ and /a/c/ In the subdirectory /a/c/, a Mathematica notebook is located, while in the subdirectory /...
user avatar
  • 4,038
3 votes
2 answers
63 views

Unable to use KnotTheory

I've installed the KnotTheory package, following the instructions here. But when I try to use it I get this error: ...
user avatar
  • 31
4 votes
1 answer
65 views

How to use Import[] to grab text displayed on a Twitter page for a non-existent username?

Let's say http://www.foo.bar/?domain=wibble returns a search page on the word "wibble" provided by an engine with the frontdoor address ...
user avatar
  • 151
4 votes
1 answer
88 views

How to import and render this OBJ file with correct texture?

Here's the output of a 3D scan of a bike, I need to render it in color with the texture file provided. Here are the files: ...
user avatar
  • 30.6k
3 votes
2 answers
75 views

How to extract numbers from a html file?

Consider an .html file. Among the code, it contains there are strings ...
user avatar
  • 4,038
3 votes
3 answers
113 views

How to separate a list of indices and data points

If I copy and paste a list of data points from the OEIS the indices come with the data points. Mathematica seems to view this as a product 0 times 0 times 1 times 0 times 2 times ... times 51. I ...
user avatar
  • 615
3 votes
2 answers
72 views

Importing multiple files with filename conditions

I have multiple pictures I would like to import all at once. The filenames range from "000001.tif" to "000200.tif." I am having a hard time importing multiple images after looking ...
user avatar
  • 107
3 votes
1 answer
77 views

Error Meshing with ToElementMesh (ToElementMesh: Cannot set region holes.) for certain objects

I have had a problem properly meshing certain .obj files, where others are meshed successfully. Here is an example of a successfully meshed .obj: Whereas, using the code at the bottom which includes ...
user avatar
  • 353
0 votes
0 answers
61 views

Meshing Error on Imported obj file

I am trying to import a .obj file to be used in a static electric field simulation. I am able to successfully run the simulation with certain other aperture geometries (see here: < https://www....
user avatar
  • 353
2 votes
2 answers
45 views

Multiple columns from a single column of data file

Suppose I have a data file containing one column of 1000 rows having x, y, z and ϕ values. I need to separate them into four distinct columns by selecting every alternative value. For example, if I ...
user avatar
  • 449
5 votes
2 answers
244 views

How to speed up loading 20k lines tsv-file with complex numbers?

I have a long (20k lines) file which looks like this: ...
user avatar
  • 1,121
2 votes
1 answer
65 views

How to import the given file?

Consider a file with the following block structure: Event XX Muon YY: data End of event Event XX' Muon YY': data' End of Event ... where ...
user avatar
  • 4,038
10 votes
1 answer
383 views

Can Mathematica read planar graphs with pc format?

We can download files about some special planar graphs at the following website, but their files are suffixed with pc. http://users.cecs.anu.edu.au/~bdm/data/planegraphs.html I don't know how to ...
user avatar
  • 1,069
3 votes
1 answer
80 views

Accessing geometry in Shape files (SHP)

Shape files can readily be imported and converted to a Dataset. For large shape files, this may unnecessarily consume a large amount of memory, particularly when the dataset is only used to retrieve ...
user avatar
  • 4,482
0 votes
0 answers
48 views

Merge plots and imported images

I am trying to plot some things using Mathematica. I haven't used Mathematica for plotting before , so apologies if my question is basic. I have the following image, which is my target image: I also ...
user avatar
1 vote
1 answer
52 views

Importing IDL sav file into Mathematica

I have a rather big (around 400 MB) file written by the IDL (Interactive Data Language) software into its binary format ".SAV" which is a proprietary format, not the spss format expected by ...
user avatar
0 votes
0 answers
58 views

ListLinePlot: Options expected (instead of ImportCSVToDataset

I have the following code ...
user avatar
2 votes
1 answer
73 views

How to import CSV file with mixed data, including string Mathematica expressions and numbers

I am importing a CSV file that looks like this (Extract of data as viewed in Notepad): ...
user avatar
  • 21
3 votes
1 answer
92 views

Extremely slow import of mx files with Molecule objects [closed]

Version: 13.0.1 on Linux Hello, I recently found a collection of 39,361 SMILES strings that I converted to Molecule format with Mathematica. I then exported the resulting list of Molecule objects into ...
user avatar
  • 545
0 votes
0 answers
40 views

How do I set permission for Mathematica to import other files on my machine?

Sorry that this is a very stupid question, but when I first loaded the new version of Mathematica (13.0.1.0) it asked me to "Allow Mathematica to open files" and I accidentally clicked "...
user avatar
  • 1
0 votes
1 answer
69 views

I need to bulk convert a number of PDFs in a folder to plaintext

I have 159 PDF in a folder with nothing else in it. I need them all converted to raw text. I found the documentation for doing them one at a time, which worked. To do them in bulk I tried this ...
user avatar
  • 615
6 votes
2 answers
276 views

File Path name copy&paste- single/double backslash problem

Shift+RightClick a file on windows explorer and select 'copy as path', then ctrl+v paste to mathematica notebook, then apply FileExistsQ : ex1) ...
user avatar
  • 3,063
0 votes
1 answer
32 views

How to import a file with 3 columns of numerical data and visualize it with ListPointPlot3D? [closed]

The file is plain ascii. e.g. 100 rows, each row like "1.23 2.34 3.45". I'm a complete novice with Mathematica, I assume this will be trivial.
user avatar
3 votes
1 answer
59 views

RunProcess : Save directly to Mathematica Variable

I can convert mysource.jpg to myresult.jpg using an external program myprog.exe, and set a ...
user avatar
  • 3,063
2 votes
1 answer
114 views

Import high-resolution images from a PDF?

I have a pdf file that I want to resize after importing. However, ImageResize doesn't seem to take into account the high-resolution of the initial image, and resizing makes it very pixelated. I can ...
user avatar
  • 971
3 votes
1 answer
43 views

How to convert PQR Entity to Mathematica Molecule format

I am using the Pitt Quantum Repository and am trying to convert the format from Entity to Molecule, so that I can get the MoleculeValue Properties of the PQR chemicals in addition to the EntityValue ...
user avatar
1 vote
1 answer
56 views

Using ReadList to read file with mixed size columns

I have a file which contains 6 columns but each column has a different number of entires. The way that this file is imported into mathematica is that the 'missing' entries for each row are simply ...
user avatar
  • 369
0 votes
0 answers
17 views

Context problems with ParallelTable and Import/Export

I work with notebooks with contexts unique to each notebook and I want to compute a list of functions $f(z,w)$ via ParallelTable and save them to files in NotebookA ...
user avatar
  • 1,169
1 vote
0 answers
29 views

How to compute the electronic energy reported by Gaussian from the AlphaOrbitalEnergies

I followed the instructions on https://reference.wolfram.com/language/ref/format/FCHK.html to analyze the fchk file. Ran an energy calculation on Gaussian , converted the results to .fchk files. The ....
user avatar
0 votes
1 answer
52 views

import a data file

I have 350 data files which i have exported like ...
user avatar
1 vote
0 answers
28 views

How to make import and export (or equivalent) work with unique notebook contexts

I currently have my notebook's default context set to "Unique to this notebook", which is useful for when I'm doing multiple projects. However, whenever I try to use e.g ...
user avatar
  • 31
0 votes
2 answers
86 views

How to create a Dataset from Nested JSON Data?

I'm importing data from Swarm into Mathematica, and I'm trying to create a dataset and having issues because the values are at different levels: ...
user avatar
3 votes
1 answer
548 views

How can I resolve an unexpected character error when trying to import selected data from a large JSON file?

I'm downloading this datafile from kaggle. I want to get all the IDs. Normally for a JSON file I'd write ...
user avatar
  • 3,862
1 vote
1 answer
89 views

Create a new variable every time I import a list file

I want to import a list and put it in a variable. The number of lists grows as the days go by, so I do not know their final number. to import the first file I use this code: ...
user avatar
  • 245
4 votes
4 answers
349 views

Read a txt file using space delimiter

I have a txt file "data.txt". This contain data like a 1 b 2 c 3 I want to import this file into two list like $\{a,b,c\}$ and $\{1,2,3\}$.I have ...
user avatar
  • 515
1 vote
0 answers
44 views

The principle of converting image with bit 8 into image with bit 16 automatically in Mathematica

I import a collagen image that is 8-bit depth but when I checked image properties in Mathematica, it shows that it is 16 bit. My code is shown below. I found that Mathematica always imports image as ...
user avatar
  • 11
1 vote
0 answers
47 views

Gaussian 16 fchk and log file import in mathematica

I am working with Gaussian log files and fchk files imported into Mathematica and I noticed a few things. The ExampleData in documentation for these files use Gaussian 03 output files, while the ...
user avatar
  • 545
2 votes
1 answer
62 views

Use ReadList with a condition for values of a certain column to handle huge (>1 GB) text files

Hello dear Mathematica community, I would like to import a very large data set as efficiently as possible. The dataset consists of four columns and 115 million rows. For the display in Mathematica, ...
user avatar
1 vote
0 answers
53 views

Erratic behavior retrieving large data (several tens of gigabytes) that has been serialized by Mathematica

Hardware: PC with 256GB RAM OS: Windows 10 Mathematica: Version 13.0.1 One of my projects has led to the creation of a SparseArray whose ByteCount is ~ 35GB in RAM. At the time of creation the ...
user avatar
  • 2,044
3 votes
2 answers
74 views

Character encoding of the output from URLExecute

Bug persisting through 13.1.0 [CASE:4932406] I'm using URLExecute to fetch some data from the arXiv preprint server but it seems that the encoding of the text I ...
user avatar
  • 3,332
1 vote
3 answers
142 views

How to select the set of points that are real from the a txt file?

I have the following txt file. Each line (except for the first line 100 and blank line) in the txt file is a point with its real and imaginary parts. For example, the points presented in the file are $...
user avatar
0 votes
1 answer
33 views

How to read the txt as points in mathematica

I have the following txt file and want to import it as 18 points in Mathematica, so that I can draw the points on a complex plane. Each line (except for the first line ...
user avatar
1 vote
0 answers
30 views

Invalid character when importing XML

I am having trouble importing XML data taken from Open Street Map. This seems to be due to a problematic Asian character. Though the full file is quite large, here is an simplified example of the XML ...
user avatar
  • 393
1 vote
0 answers
51 views

Reading *ptw files into Mathematica

I have a SWIR camera that outputs raw image files in *ptw format. I need to read them into Mathematica for image analysis. I know that such files can be read into Matlab and C++, so there must be a ...
user avatar
  • 11
0 votes
2 answers
82 views

Plotting data and fitting to a function

I have three sets of data. I would like to plot them in the same graph. Then plot the following fittings to the data. Any help is appreciated! f(v) = (v^2)*exp(-mv^2/2 kb T) f(v) = (v^3)*exp(-mv^2/2 ...
user avatar
2 votes
2 answers
272 views

Building a distance matrix

I came across an interesting exercise that I would like to try to solve with Mathematica to improve my skills. In data is provided to build a distance matrix. The data looks like this, starting from <...
user avatar
  • 45
1 vote
2 answers
84 views

Change a value within a list from a string to number

I have a table with 10 columns. The last column contains a string; e.g., "center", "passageway 1", up to "passageway 8". I want to change the last column so that the ...
user avatar
  • 245
1 vote
2 answers
370 views

Getting stock quotes from Yahoo Finance API in Mathematica

I have obtained a Yahoo Finance API key and would like to try it out by making a simple request from within Mathematica. Their tutorial page has some nice little example code snippets in various ...
user avatar
1 vote
0 answers
37 views

Failing to import a TGF file of a graph with no edges (V12.x and V13.0)

Bug persisting through 13.0 Version: 12.x and 13.0 I am having an issue with importing a graph stored in the Trivial Graph Format (TGF) when the graph has no edges. Consider the following: ...
user avatar
22 votes
1 answer
962 views

Why in Mathematica 13 do imported PDFs have lower image quality?

I'm finding images imported into Mathematica 13 notebooks are noticeably pixelated. (Oddly, pasting an image into a notebook cell does not have this problem.) Has the default changed for some import ...
user avatar
  • 12.5k

1
2 3 4 5
30