# Questions tagged [array]

Questions about Mathematica arrays, or implementing array data-type functionality, i.e, collections of regular dimensions containing elements that can be accessed by standard (computable) indices.

391 questions
Filter by
Sorted by
Tagged with
174 views

71 views

### Link elements from list to make more lists from certain lenght [closed]

How can I go from this list [36, 73, 84, 0, 73, 83, 0, 69, 69, 78, 0, 84, 69, 75, 83, 84, 31] to this [0000003673, 8400738300, 6969780084, 6975838431]. Is there also a way to make the elements the ...
74 views

### How to change Global Preprint preferences for how matrixes are displayed?

I asked a question about how to make all array outputs be displayed as matrices a few weeks ago. I have run into a problem ensuring that the setting change is permanent, however. I thought the global ...
91 views

### What is the difference between Catenate and Flatten? [closed]

I am having a hard time understanding the difference between Flatten and Catenate. Consider the following example code: ...
65 views

### How to graph a discontinuous array of data

I have an array of data, I am trying to plot it but I need to draw a line each 10 data and displayed as a discontinuous function. I tried using ListLinePlot but ...
33 views

### How can I merge indices, such as converting a $4$-index list to $2$-index matrix, $C_{ijkl} \rightarrow D_{(ik); (jl)}$?

How can I merge indices, such as converting a $4$-index list to $2$-index matrix, $C_{ijkl} \rightarrow D_{(ik); (jl)}$? This example sometimes appears in physics applications. Here, I mean $(ik)$ as ...
45 views

### How to compose an algorithm to create new array (based on array data), if I need a reference to an array being created, no for loop, in mathematica?

I have an array with either 1 or 0. From this, I am trying to create a new array with intervals. I have some base interval, one step, we can say 1 second here. If there is 0, I skip, if there is 1 I ...
97 views

### How to reorder a 3d (m x n x n) array to extract an n**2 length list of sequences of m points

I have a 900x100x100 array of floats called 'data' which is essentially 900 frames of 100x100 pixels. I want to extract 10,000 sequences of 900 values each. These are essentially the time series of ...
42 views

### Evaluate an expression with numerical values

I hope this time you guys can help me. I have the following numerical expression: ...
46 views

### Replace Array on symbolic expression

Following my previous question: Go back to a symbolic expression to evaluate derivative I've changed my code to keep the symbolic expression. My question now is if there is a way of replacing L1 and ...
65 views

New to Mathematica. I want to create and combine K1, K2, and K3 (shown in the first picture below) into the 8x8 matrix shown in the second picture below and keep the heading as shown if possible: ...
67 views

### How to get a specific component of an equation without hardcoding? [closed]

Say I define an equation line[t_] = {t, 2t, 3t}. What code will define x[t] = t, y[t] = 2t, ...
43 views

### Function of an array of values with length dependent on another variable

I need to define a function of arbitrarily many variables, whose number is itself a variable of the function. Schematically it would look as following: ...
36 views

### Using the for loop in the Module function

Good afternoon, I need some help. I have compiled a function that calculates the flight of the ball, step by step I made an analytical solution first, then a numerical one. But in numerical it is not ...
82 views

### How to build my desire matrix using SparseArray?

I have built some lists as follows: ...
87 views

### How to link value pairs to formula

I got this formula ...
85 views

### How to change a string-formatted element in an array?

I have an array called Array7 in which a typical element, let's say Array7[5][[22]], looks like this: ...
43 views

### Check an input matrix M contains any nonzero diagonal matrix element or not

Is there a way to easily check an input matrix M contains any nonzero diagonal matrix element or not? For example, if the M contains any nonzero diagonal matrix element, Output: True. if the M ...
49 views

### Partitioned matrices back to array [closed]

mat1 = Table[ If[i > j, RandomReal[], -RandomReal[]], {i, 16}, {j, 16}]; mat2 = Partition[mat1, {4,4}]; Is there a possibility to get the first one from the ...
35 views

### $P=QRS$ decomposition of given list-3-unordered list

This is an extended version of my previous posts, $P=QRS$ decomposition of given list, P=QRS decomposition of given list -2 -unordered list Inspired by @Bill, and considering multiplicities, ...
174 views

### add columns of list {a0,b0} to columns of list {{a0,b0} ,{a1,b1} ,{a2,b2} ...{ax,bx} } [closed]

If I want to add the columns of {1,2} to each of the columns of say {{1,2},{3,2},{4,2}} resulting in {{2, 4}, {4, 4}, {5, 4}} How would I do this? and for any ...
47 views

### P=QRS decomposition of given list -2 -unordered list

This is an extended version of my previous post, $P=QRS$ decomposition of given list Based on the answer and comment of @Bill, Form all permutations of P. Form Q as the first element of each of those,...
24 views

### Given sum of sequences, choose two sequence elements and make other sequence zero with making some sequence vanishes and others keep untouched

Slightly modified from my previous question Making function for a given input of sum of sequences, choose two sequence $a_i, b_j$ and substitute all other sequence zero At this time I want to make ...
47 views

### How to generate an 3D animation of an evolving 2d square array surface w.r.t time?

I have a data file consists of evolving 2d square array over time. The first block of the 16*16 square array contains the initial values on each of the 256 points. Then the 2nd block is the square ...
39 views

### Making function for a given input of sum of sequences, choose two sequence $a_i, b_j$ and substitute all other sequence zero

Suppose I have a sequence a,b,c,d,e,f,g and for given sequence whose element is expressed as a1,a2,a3, ... , c1,c2,c3, ... g1,g2,g3, and so on. And suppose from these sequence with some manipulation ...
222 views

### Is there an easy way to copy a TableForm column and convert it into a vector?

Is there an easy way to take a column output from a TableForm command, like this: ...
59 views

### Exporting complex exponential float arrays to Python

A question related to a previous question. The answer in the previous question works well for simple complex arrays but not when considering arrays with exponential float coefficients as in the ...
315 views

44 views

### Replace Part of QuantityArray

I can't figure out how to replace a part of a quantity array. I have: executionList // Dimensions {65, 7} where each row is a QuantityArray: ...
134 views

### How to get Sum of array of integers?

This question seems easy but I am struggling with it now, I tried a few ways and check this solution as well but couldn't help me, please check and help if you are able: So I need to save the sum of ...
71 views

### Array summation conditioned on maximum and uniques

Given three arrays, for example s={1,3,2,3,1,2,3,2,1} r={4,2,6,5,4,6,2,1,3} f={1,3,9,1,8,4,4,8,2} I'm trying to output four summary arrays The uniques of s For ...
101 views

### Exponential Decay fit and printed parameters with integer data [closed]

Problem: I'm trying to plot an exponential decay curve on a set of integer data, and print the various parameters and their uncertainties on the plot itself. Having adapted code from another question, ...
37 views

### Eliminate selectively members from an array in Wolfram Mathematica [closed]

There should be a way to do it in Wolfram Mathematica ... I want to eliminate from an array the members that have a corresponding Null on another one. E.g. if I have ...
46 views

### Problem with DataRange and PlotRange in ArrayPlot

I have the following ArrayPlot: M = RandomReal[1, {5, 9}]; ArrayPlot[M, FrameTicks -> Automatic, DataRange -> {{11, 19}, {1, 5}}, AspectRatio -> 1/2] ...
139 views

### How to generate isotropic tensors?

Consider a real tensor $\bf{T}$ upon $\mathop\otimes\limits_{n}(\mathbb{R}^3)$, with a definite order $n$, it could be isotropic, i.e., be invariant under the action of all elements in $SO(3)$(not \$O(...