Questions on the manipulation of List objects in Mathematica, and the functions used for these manipulations.

learn more… | top users | synonyms (4)

1
vote
0answers
41 views

Substitution does not work while substituting with a value from list

I am writing a program which iteratively solve and make substitution from a list. As I have shown in the code substitution works when I enter the value directly (Input 100). When I extract the same ...
1
vote
0answers
76 views

Find algorithm or generator formula with automated procedure and pattern recognition

I am trying to find a generator formula for the discriminant of a polynomial and believe it would be an interesting problem for the Mathematica community to know how to automate evaluation of certain ...
1
vote
0answers
64 views

List manipulations with ; and ;; [closed]

I have the following list: L = {{a1,a2,a3,a4},{b1,b2,b3,b4},{c1,c2,c3,c4}} By using just the ; or ...
1
vote
1answer
128 views

Appending elements to a list in parallel table

Is there any way to store values in a list that is being computed in parallel? For example, if ParallelTable is computing some ...
1
vote
1answer
72 views

How to list indices of list elements that meet a condition? [closed]

Is there a tidy way to create a list of the indices of elements of a list that meet specified conditions? This method gets the job done, but it's clumsy and not conducive to nesting: ...
1
vote
0answers
55 views

Problem with ParallelTable in using externaly defined iterator [closed]

In order to reduce my computation time, I'm making some tests with parallel computation, especially with ParallelTable. Here is a simple code : ...
1
vote
0answers
51 views

Creating a List with Lists as entries [closed]

I'm trying to create a list A which contains 8 same elements. Each of the elements look like {0, 0, 0, 0}. I was able to do it ...
1
vote
2answers
51 views

Creating a list of triangle-square numbers up to n_

I have to, for a class, create a function that gives you the triangular-square numbers up to n. That said, here's the code I have: ...
1
vote
1answer
63 views

List Manipulation and Removing Cases

I've imported a large data set, manually removing headers in the .rtf file where it originates. However, when I import this data, I receive this output: ...
1
vote
1answer
36 views

Applying MeanFilter to a large Nested Array [closed]

I have a large nested array. Let's generalize it to this: Data = {{a1,a2,},{b1,b2},{c1,c2}} I need to make a new array where ...
1
vote
0answers
109 views

How to create a complex variable from dated list values

Can anyone help me to construct a variable "PI" from values of variable x. Variable x represents a group of two time series rj and ri on equal dates(joined two dated lists with states).Variable x have ...
1
vote
1answer
131 views
1
vote
0answers
60 views

deleteduplicates Delete elements of a list [duplicate]

I have a math problem about Mathematica, I am looking help from you. I hope that you could help me. The Math Problem: list= { {0,0,1},{1,0,0},{0,1,0} ,{1,2,3}}; ...
1
vote
0answers
139 views

How to sequentially select, from a large set of tuples (of matrices), those with a certain property

I'm interested in finding a computationally efficient way for selecting all tuples of matrices which have a certain property. The property I'm interested in is that I want the column sum, of f[the ...
1
vote
0answers
52 views

A more efficient way of fitting a non-linear model that returns an entire list?

I have a function that takes two parameters, del and nu, and returns a list npoints long ...
1
vote
1answer
83 views

Make duplicate string then join two strings together in a table

I have two lists of data, dataA and dataB. ...
1
vote
0answers
338 views

Convolve two sets of (x,y) data sets

I have two sets of data in the form a={{.1,2},{.2,3},{.3,4},{.5,6}} b={{0,8},{.1,4},{.2,7},{.3,1},{.5,10},{.6,3}} Both data sets have even spacing, although ...
1
vote
0answers
106 views

New list generated from the sum of elements taken from two lists

I have been using mathematica for a while, but I have problem wrapping my head around list manipulation functions. I would appreciate any suggestions. Here is what I want to do. ListV is a list of ...
1
vote
0answers
37 views

How do I define a tensor from another tensor with summations? [duplicate]

Let's say we have a rank 2 tensor $g_{ij}$. This is basically a list with a Depth of 2. Now I'd like to calculate another tensor ...
1
vote
2answers
203 views

Discretizing data using quantiles in Mathematica

I am trying to discretize a long array of real numbers into a uniformly distributed integer array. To do this I am identifying the quantile where each real value sits and writing it out to the output ...
1
vote
1answer
118 views

Testing a List inside of an Table if it is != 0 [duplicate]

I'm new to mathematica so I hope this is not a too stupid question, but I couldn't find a solution in the mathematica documentation. I've got a normal table, initialized with "0" as entries. In the ...
1
vote
0answers
287 views

Using Part within a Compiled Command

I'm looking to define a multi-line function that makes use of the "Part" command. A toy example: ...
1
vote
0answers
40 views

How can I access numerical values of variables calculated with Solve? [duplicate]

I am trying to calculate some thermodynamical cycles so I often use lists with equations. Here's a simple example: ...
1
vote
0answers
37 views

How to divide all rows of a matrix by their row sums [duplicate]

I've got a general matrix K that I would like to divide it's row's by the row sums of the matrix. I could get this going by doing ...
1
vote
0answers
99 views

Optimized subset algorithm implementation

I was reading a paper from Mathematica Journal.It mentions a code for calculating subsets. ...
1
vote
0answers
152 views

Why doesn't ParallelMap improve the performance of FoldList?

This question arose during my analysis of the following problem: filling gaps. (The code used here is Simon Woods's work.) FoldList seems to not cooperate with ...
1
vote
0answers
62 views

Sorting Eigensystems [duplicate]

SO I have this code: ...
1
vote
0answers
144 views

Transferring a list from one notebook to another [duplicate]

I have Mathematica code split into two notebooks. The first part is supposed to run and output a list of numbers into a text file, using Export. The second part ...
1
vote
0answers
91 views

Non Commutative Multiply [duplicate]

Possible Duplicate: Non-commutative symbolic linear algebra I want to multiply two matrices, for example, A = {{e, f}, {g, h}} B = {{a, b}, {c, d}} ...
0
votes
3answers
2k views

How to make all values positive?

So I have a list of data that contain both positive and negative values, and I am wondering what I have to do in order to make all the numbers positive.
0
votes
4answers
74 views

Cases vs Select, Pattern vs Pure function [duplicate]

What is the difference between having Cases with selection condition presented by pattern and a with pure function as condition? ...
0
votes
3answers
83 views

How to iterate through a list of rules?

Let's consider I have a list of rules: {Aa -> 1/2, Av -> 2/5, Bx -> 3/7, Ce -> 4/9, ...} I want to find all keys that contain the letter "A" and ...
0
votes
2answers
1k views

How to generate table without comma and bracket or get rid of those?

I want just data without comma and brackets. Even TableForm is not working for me. For example, the general pattern of my table is ...
0
votes
2answers
123 views

Where are the functional programming constructs: `every` and `some`? [duplicate]

Coming from other functional programming environments (e.g., Clojure) I've become accustomed to some functions that I haven't found equivalents for in Mathematica yet. The two I reached for last ...
0
votes
3answers
76 views

Splitting a list of lists

What would be a nice way to split the list list = {1,2,3,{a,b,c},4} into {{1,2,3,a,4},{1,2,3,b,4},{1,2,3,c,4}}
0
votes
5answers
88 views

Merge two lists for List3DPlot [duplicate]

I have a two lists: list1 = {{x1, y1}, {x2, y2}, {x3, y3}, {x4, y4}, {x5, y5}} and list2 = {z1, z2, z3, z4, z5} and I want to ...
0
votes
2answers
87 views

vectors constructed with $0,1$ permutation

Our desire is to construct $2^N$ vectors with indices $i=1,..,2^N$ with elements by permutation of $0$ and $1$. For example ($N=3$): We write below code ...
0
votes
2answers
122 views

Generate a list with random values between a and b [closed]

I am trying to perform system identification.. To properly identify the system i have to give the system a "rich" signal which are able to "activate" all the modes of the plant. A rich signal would ...
0
votes
4answers
141 views

Using levels in MapIndexed

I am trying to use MapIndexed to manipulate a matrix of data but I am having trouble getting the levels parameter to work the way I would like. Suppose that my data ...
0
votes
2answers
288 views
0
votes
4answers
99 views

How to express “if any component in a vector satisfies that …” in Mathematica

For example, l is a list of vectors. I need to delete from l all the vectors with any component larger than 1. How should I do ...
0
votes
2answers
182 views

Defining a function as a sum of several Gaussians

I have a function that is a summation of several Gaussians. Working with a 1D Gaussian here, there are 3 variables for each Gaussian: A, ...
0
votes
3answers
109 views

How to get the indices of values in a list which are NOT an specific integer?

I got a real array A, where Dimensions[A] == {5000, 5000, 5}. Some of the values in A are ...
0
votes
3answers
357 views

Finding an index with certain conditions

EDIT: I need to find out an index i which depends on certain conditions and I'm not able to implement it. I have a list (time points) $t_i$ and two constants $a,c$ ...
0
votes
3answers
53 views

How to generate a list of outputs for function f(x,y) for a set of known (x,y) values [on hold]

Say I want a list of outputs the function f(x,y)=x+y will give for x,y values of (1,5),(5,3),(0,2),(1,1),(2,6). How do I do that? I know this must be pretty straight forward. I just can't figure it ...
0
votes
2answers
132 views

How do I perform the riffle function backward? [duplicate]

I know riffle will combine the lists {1,2,3} and {a,b,c} to be {1,a,2,b,3,c}. Is there a way to work backward and split the list {a,b,c,d,e,f} to be {a,c,e} and {b,d,f}?
0
votes
2answers
127 views

adding a 1 to all second elements

I want to add 1 to all second elements but I am running into a "level" problem I believe here is my code: ...
0
votes
3answers
420 views

How to solve correctly inside a DO loop and then plot

Here is the corresponding code First the equations setup ...
0
votes
3answers
1k views

Find the number of nonzero elements

How do you find the number of elements in a matrix that are non-zero. For instance, the following matrix has 5 nonzero elements. ...
0
votes
1answer
452 views

how to work with list as function parameter

I want to output an arrow based on input from user and I tried writing this small function to achieve this: ...