The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
55 views

Shifting Columns in an Array Efficiently

I am trying to find a more efficient way to shift the columns of the partitions of an array according to a defined slope and fill in the shifted regions with zeros I have done it below but, I know it ...
0
votes
0answers
80 views

What is the difference between Array and Table? [on hold]

I cannot understand the difference between Array command and Table. I can reproduce the example in ...
0
votes
1answer
37 views

How to assign the array data to variables?

A very basic question but puzzled me for long time on how to assign array to variables. For instance, we have array {{t1,x1},{t2,x2}...{tn,xn}} how to assign the first element to variable t and ...
2
votes
1answer
59 views

ListContourPlot

I am having some issue with ListContourPlot. When I define the following Array: ...
0
votes
1answer
68 views

Array element problem in optimization

I have the following piece of code in Mathematica: ...
0
votes
1answer
88 views

Block matrix and calculate it's inverse

How to define the following block matrix $$ A=\begin{bmatrix} H-G_1 & -G_1 & \ldots & -G_1 \\ -G_2 & H-G_2 & \ldots & -G_2 \\ \vdots & \ldots & \vdots & \vdots ...
0
votes
1answer
25 views

Defining an array using this specific rule [closed]

To a pair of natural numbers $(m,n)$ I would like to associate the $6(m-n+1)\times 2$ array whose rows consist in all pairs $\{x,y\}$ of natural numbers where $m\leq x \leq n$ and $y\in[\lceil x/5 ...
0
votes
1answer
46 views

Entering block matrices, general case doesn't work

I want to enter several matrices at different positions in blocks. There is already a very similar answer here: http://mathematica.stackexchange.com/a/3562/6138 I thought that simply generalizing ...
3
votes
2answers
137 views

Pairwise similarity comparison

I have a 444-member array of arrays called final, with each subarray containing 12 integer members. How can I do a pairwise comparison of the contents of the ...
1
vote
1answer
73 views

Graphic timeline from array

I found this question where someone put some code to graphic a timeline based on a certain number of events. In that code in particular, the events are hard coded one by one, I want to modify it, so ...
2
votes
2answers
50 views

editing entries of a sparse array + sparse Smith normal form

Why does the following code ...
2
votes
2answers
44 views

How to delete certain unwanted elements from an array

Suppose I have an array like so array1 = {{Null,2,3,4,5}, {a,b,c,Null,e}, {w,x,Null,y,z}} Is there some way to selectively remove any element I ...
0
votes
0answers
26 views

Importing large arrays and releasing memory

I am trying to import huge 3 dimensional arrays (in my case approximately 2GB) which I calculated before and saved in .MX format. Then I want to work with a smaller ...
3
votes
1answer
65 views

Fast list interpolation over common x,y for multiple variables

I have a (long, >50K elements) unstructured list with a header similar to; AList[[1]] = {x,y,z,var1,var2,var3,var4,...,varN} I want to interpolate z, var1, var2, ...
0
votes
0answers
59 views

Is there a command like meshgrid in Mathematica? [duplicate]

Just like the title, I need to do a meshgrid in Mathematica, is there any command like that?
10
votes
3answers
272 views

Sorting Lists of lists of arbitrary length

I'm trying to sort a list of lists. The sublists are defined in length, but the length of the list containing it varies. A simplified set might be: ...
6
votes
3answers
224 views

List Manipulation on Array with subscript elements

I am trying to write a function which operates on an array with subscripted elements. As an example i have the array a={$1_3$,$2_2$,$4_1$}, which means i have 3 amounts of value 1, 2 amounts of value ...
3
votes
4answers
151 views

Plotting recursive from a for loop

our assignment is that we have make a plot for the possition of 1's From the recursive function if a[n-1] is even then ...
-2
votes
1answer
68 views

How do I store values in a for loop into an array and then plot that array? [duplicate]

What my title said and I want to plot the values of the array. still new to mathematica and programming so its hard to formulate my question just right
7
votes
2answers
76 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
302 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
75 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
62 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
288 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 ...
1
vote
4answers
103 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
48 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
103 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
83 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
67 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
86 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
230 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
120 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
143 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
173 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
120 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
148 views

Solve function doesn't work

I have the following system of equations that I need to solve: ...
5
votes
2answers
280 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
97 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
208 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
165 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
353 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
254 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
121 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
167 views

Padding of matrix

I want to do padding of matrix a = {{x,x},{x,u}}; to ...
10
votes
1answer
223 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
180 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
58 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 ...