Skip to main content

Questions tagged [data-structures]

Questions on using or implementing more or less common data structures such as linked lists, structs, trees, tries, heaps etc. in Mathematica.

0 votes
0 answers
51 views

Speed up the evaluation process

I am writing a code to simulate some spins. Following is the main part of the code: ...
P Pyne's user avatar
  • 473
0 votes
1 answer
105 views

Need explanation on data[[i]][[1]]

I am trying to train a physics model and then check its profile. For this model, data for physics model is defined with: ...
Dean's user avatar
  • 655
0 votes
2 answers
60 views

Interpolation function for data with repeating independent variable

I want to find an interpolation function for data in which the x-variable is repeated (example below). The repetition in data is natural and cannot not be eliminated. Can I somehow use ...
SciJewel's user avatar
  • 575
7 votes
0 answers
109 views

DataStructure's "DynamicArray" underperforms Association?

The documentation for DynamicArray states that it is "An extensible array is useful for continuously appending elements, as well as for efficient element extraction and updating." I tried a ...
Craig Carter's user avatar
  • 4,625
1 vote
2 answers
74 views

Contour plot data extraction and replacing z slices with user defined function

Let's say we have a contour plot of the following, ContourPlot[Cos[x] + Cos[y], {x, 0, Pi}, {y, 0, Pi}, ContourLabels -> True] that gives, we can extract the ...
a019's user avatar
  • 867
0 votes
0 answers
62 views

Long associations of short associations or the inverse, which one should I use?

I don't have enough experiences of using Association or Dataset, and when operating with nested associations I meet the ...
Lacia's user avatar
  • 2,443
2 votes
1 answer
90 views

How can I join non-overlapping TimeSeries so that the gap between any two is considered to be Missing data?

I have a set of time series sampled at one second intervals. For example, ...
Nick's user avatar
  • 413
0 votes
1 answer
77 views

List structure for plotting multiple y-values (with gaps on certain dates) using DateListPlot

I would like to set up a list like this data = {{Date1,y1,y2,y3,y4,y5,y6},{Date2,y1,y2,y3,y4,y5,y6},...} and then use DateListPlot to create various plots, e.g. y1 ...
ConfusedCabbage's user avatar
3 votes
1 answer
72 views

Question on splitting into individual cycle from a list of 30 cycles dataset

Hi I have a set of data and will like to find out I can split these 30 cycles into each individual cycle? Do I use the for loop function in this application. Thanks for the help in advance. ...
Boajj04's user avatar
  • 320
0 votes
1 answer
263 views

How to rotate matrix? [closed]

Consider the matrix 'm1' : m1 = RandomReal[{0, 1}, {100, 100}]; The question is, how to rotate the 'm1' data 45 degrees and extract the matrix 'm2' from it (shown ...
ralph's user avatar
  • 1,029
1 vote
1 answer
78 views

selecting specific part of data set [closed]

I have data set in form {section, Arcangale ,X,Y, type}. Section is the number between 1 to 3 (1,2,3), Arcangale is number change from 0 to 1 something like this (0.0176575), x and y are coordinate (...
Parviz's user avatar
  • 403
0 votes
0 answers
68 views

Heap.m data structure package in Mathematica (Book: Computer Science with Mathematica, CUP press)

The CUP press book Computer Science with Mathematica discusses heaps in section 8.4.3. The package Heap.m is mentioned (for import), containing functions such as HeapPlot. Can you advise where to find ...
ExpressionCoder's user avatar
2 votes
1 answer
153 views

How to convert a dataset into an alternative format

I have the following dataset: ...
Tugrul Temel's user avatar
  • 6,233
19 votes
3 answers
711 views

Difference between HashTable datastructure and Association datastructure

Is there a difference in the runtimes between CreateDataStructure["HashTable"] and <||> in terms of inserting, ...
Lucas Mumbo's user avatar
7 votes
0 answers
238 views

Mutable objects in Wolfram Language

I've seen some posts about mutable objects in WL and some implementations: Once more on object orientation in Mathematica: does it have to be so hard? Immutability, Association and typing Code ...
daneelsan's user avatar
  • 368

15 30 50 per page
1
2 3 4 5
14