The tag has no wiki summary.

learn more… | top users | synonyms

6
votes
2answers
53 views

Recursive function with array of variables

I am trying to create a recursive function which works with an increasing array of variables. Since the formula is quite complex, i will try to simplify my example to the core of my problem. The ...
3
votes
2answers
226 views

How to create a 'shortest-path link matrix'?

I am currently struggling with a problem in Mathematica. I have a randomly generated weighted Barabasi-Albert graph and a corresponding demand matrix of the same size. I'm generating the graph with ...
2
votes
0answers
71 views

An efficient way to merge a pair of 4d arrays of non regular length lists

Question I have two 4 dimensional non regular length lists of complex values. I have working code however it seems quite slow and I am not sure how I could improve this. Mathematically I am trying ...
1
vote
2answers
59 views

Generating an Array of Vectors

I'm working a lot with nested lists of $(x,y)$ coordinates (of a FEM-like mesh, but that's not important), like so: ...
6
votes
8answers
236 views

Merging lists and adding common elements [duplicate]

I have two 2D arrays where some of the x-values are identical, L={{1,1},{2,2},{3,3}}; J={{0,1},{2,2},{4,4}}; I want to add these lists in the following way ...
0
votes
4answers
95 views

Converting format of list

I have a 2D array, data = {{0,1}, {1,2}, {2,3}}; I would like to convert it such that I get the x- and y-values separately, specifically ...
1
vote
3answers
44 views

Collect the lists

I have a list of lists from which I pick out the positions of the number 1 and then print out these positions for each list. I am having some trouble collecting what I am printing into a list / matrix ...
1
vote
1answer
61 views

Plot Legends and Frame Ticks in Array Plots

Why do the frame ticks go away when PlotLegends->Automatic is inserted in an Array Plot? For instance, the following code produces an Array Plot with Frame Ticks. ...
0
votes
4answers
75 views

Drop row if sum of part of row is equal to zero

My problem is the following: Suppose I have a matrix A which looks the following: ...
0
votes
2answers
70 views

Can `Array` work as `Loop`? [closed]

I got Mathematica code from my friend: ...
0
votes
0answers
24 views

How can I give input to an ArrayPlot [duplicate]

I would like to create a dynamic ArrayPlot so that the squares, when clicked, provide input. Can I use ArrayPlot for this? Or is there something else I should have to use.
0
votes
2answers
59 views

Import array indices from Excel

In an Excel file, I have some numbers which I will use as the indices of arrays. I want to read those numbers and assign them as the array indices in Mathematica. For instance, in Excel I have and ...
0
votes
1answer
61 views

Import a data stored in EXCEL and change it to a Table [closed]

I have an EXCEL file in which large amount of numbers is stored in a column in the first sheet, like data in the column A of the sheet1 of excel file. When I apply the Import function; the data is ...
10
votes
1answer
215 views

Using Mathematica to make a graphics array of circles

I need to make .svg file that contains an array of black circles that all have radii of 5 units ad are evenly spaced apart from each other 32 units. The difficulty in creating this design is the ...
0
votes
1answer
115 views

Finding the first five eigenvectors and values for a 500×500 matrix

I'm trying to find the first five eigenvalues and vectors of a matrix that has the following proporties: ...
4
votes
4answers
128 views

Better way to select all array indexes matching predicate?

I'd like to select (offset) indexes of a number of array points, that match a selection criteria. I can do this by creating a Table of all the coordinates, and then selecting all the values: ...
2
votes
4answers
168 views

Replacing High Densities of 1.s in Very Large Binary Arrays

I am working with very large binary arrays on the order of {100,100000}. It may look something like this. ...
3
votes
2answers
118 views

Replacing Patterns In a List of Varying Length

I am working with an array of data that may look something like this. ...
0
votes
0answers
98 views

Solve function doesn't work

I have the following system of equations that I need to solve: ...
5
votes
2answers
218 views

Labeling a grid

I have m = {{0, -1, -2, -3, -4}, {1, 0, -1, -2, -3}, {2, 1, 0, -1, -2}, {3, 2, 1, 0, -1}, {4, 3, 2, 1, 0}}; And a grid ...
1
vote
1answer
90 views

Generate a list of values with equal number of each value

I want to create a list of 32 values such that from {a,b} I can generate ...
0
votes
1answer
36 views

Generate array of every $n^{th}$ integer between two bounds [closed]

I want to generate the series {1930, 1934, 1938, ..., 2014} with Mathematica. I found that I can use Sum[2014-m*4, {m, 20}] to ...
2
votes
1answer
165 views

Plot 3D boolean Array or matrix in Mathematica

I have been attempting several methods to plot a 3D diagram of a n by n boolean array in Mathematica but none of them produced satisfactory result. I want the $3D$ plot to have a cube when ...
5
votes
1answer
156 views

How to combine matrix with array without cycles?

I am new to Mathematica. And I'm sorry for my English. I have created a matrix ($6 \times 4$) and an array ($1 \times 4$). I want to get another matrix that will have the first element from the array ...
4
votes
4answers
322 views

Efficient method for Inserting arrays into arrays

This is strongly related to the following Questions: Looking for a way to insert multiple elements into multiple positions simultaneously in a list Building matrices by attaching vectors (columns) ...
3
votes
2answers
236 views

Mapping multiple functions over an array

I am looking for an elegant way to Map multiple functions over an array. My problem looks something like this: Consider a list of functions: ...
4
votes
2answers
115 views

Values (or positions) of array row elements within a specified number of positions from target value

I have the need to collect values from the rows of rectangular arrays of arbitrary precision integers, given a target element value and allowed "distance" (positions +/- within the row from found ...
0
votes
3answers
156 views

Padding of matrix

I want to do padding of matrix a = {{x,x},{x,u}}; to ...
10
votes
1answer
195 views

Drop selection of columns from a ragged array

I have an application where I need to drop some arbitrary list of columns from a ragged array (where of course the shortest array rows have at least all the specified columns). E.g., given a ragged ...
1
vote
2answers
147 views

2D Fourier transform of a table - ArrayPlot issue

Recently, I have encountered an issue with ArrayPlot after performing a Fourier transform of a table. Picture presented above is an ArrayPlot of a 2D table. Using Fourier on this 2D table I obtain ...
0
votes
1answer
56 views

Extracting second value of each sublist [duplicate]

How can one get the second value of every array inside the outside array? I have the following data data = {{10, 20}, {30, 40}, {50, 60}}; I want to extract ...
0
votes
0answers
54 views

Generating the set of all three-dimensional binary arrays distinct under rotation and reflection?

How can I automatically generate all possible three-dimensional binary arrays of size $(x_1 \times x_2 \times x_3$) where each array is distinct from all others with respect to rotation and reflection ...
4
votes
3answers
290 views

Finding connected components in an array

I have an $w\times h$ array with non-negative integers. I wish to partition the set of coordinates $(c,r)$ with $1\leq c \leq w$ and $1\leq r \leq h$, in subsets, so that each subset corresponds to a ...
1
vote
2answers
73 views

Unknown limit of an array of area integrals

Could someone explain why Mathematica can't finish computing this limit (this is a limit of an array, when n -> Infinity (n ...
1
vote
3answers
134 views

More elegant/efficient solution to browse through an array

I have an array of lists and want to correlate every list with each other like this: ...
0
votes
2answers
99 views

Specifying an array that may have an unknown number of entries [duplicate]

Say I'm running some process of unknown duration, and during the process, I need to periodically record the state of some variable. If we knew exactly how long the process took, we could simply ...
10
votes
2answers
521 views

Finding all possible solutions to a math mind game

In the example below the letters shall be replaced by numbers. The numbers are from 1 to 9, and each letter has the same number ...
2
votes
2answers
61 views

Specifying an array with a specific number of copies of two elements

To specify an array of length L in Mathematica, where each entry is someElement, I'm accustomed to writing: ...
1
vote
3answers
94 views

Detecting the existence of an element in a subarray with specific properties

If I have an array that looks like this: ...
5
votes
0answers
250 views

How to extract structured array data from DefineDLLFunction in Mathematica

I want to use my Bluechip PCI-ADC acquisition card in Mathematica via his dynamic link library “Bcdll32.dll”; (used to access functions on my PCI data acquisition cards). My problem is the function ...
5
votes
3answers
233 views

How to make a control array of buttons or togglers?

An array of buttons From time to time I wish I had a control array of the sort native to Visual Basic. A control array of buttons would be a table of buttons in which each button "knows" its ...
0
votes
3answers
95 views

List of squareful, cubeful, etc. numbers

The following works: ...
0
votes
0answers
27 views

Convert separate digits of a number into an array [duplicate]

Is it possible to convert the digits of a number such as Pi into an array? It's supposed to be something like this: Digits = {3, 1, 4, 1, 5, 9, 2, 6, 5, 3...}
0
votes
0answers
45 views

Why might ListStreamPlot fail to cover StreamPoints?

I have a pretty sparse array of vectors (in the colloquial sense that it covers the domain sparsely; it's not a SparseArray). ...
3
votes
3answers
139 views

Lists - pairing up

I have two (fairly large) lists of equal length & would like to pair them up. eg - from: a = {{0, 1}, {0, 2}, {0, 3}}; b = {{1, 2}, {1, 3}, {1, 4}}; I would ...
6
votes
1answer
220 views

Is matrix multiplication automatically done in parallel in Mathematica 9?

In good old Mathematica versions (5.2, 6.0), matrix multiplication was automatically done in parallel. For example, on an 8-core machine, define two square real matrices: ...
1
vote
2answers
95 views

How do I assign specific data points in an array to a new array?

I am trying to learn how to script/program in mathematica and I am retyping some simple C and FORTRAN programs into Mathematica as a way to learn. I am writing a Monte Carlo code to calculate the ...
7
votes
3answers
218 views

How to Flatten Array of Arrays of the highest order in a simple way?

I have a matrix of matrices, given in the following code. I want to flatten the array... ...
3
votes
7answers
332 views

Concise way to generate multiset lists

I wrote the following to generate a multiset with the same number of items over a fixed range: ConstantArray[#, 3]& /@ Range[9] // Flatten ...
1
vote
1answer
181 views

Formatting plot of symmetric points differently to asymmetric points

From an array of numbers, I would like to determine (and then colour appropriately) which points are symmetric about a given axis (here, $x = 1/2$), and which are not. For example, form this: ...