Questions tagged [list-manipulation]

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

Filter by
Sorted by
Tagged with
-1
votes
1answer
37 views

lists generated by a for loop [closed]

I have a for loop. Each time it iterates, prints a list. But, some of the printed lists are the same. How can I understand how many different lists I have and what are the different lists? In other ...
-1
votes
1answer
101 views

Repeating Calculations/Iterations without a specific function

I am trying to repeat an initial condition many times such that I get a desired final output. ONE final output depends on many subsequent calculations from ONE initial condition. But I want to get a ...
-1
votes
1answer
36 views

Producing a list [closed]

Table[x, {i, 5}] In mathematica 9 this results in {x,x,x,x,x}, but in v10 it's {1,1,1,1,1} ...
-1
votes
2answers
713 views

Changing the precision of data in a list of matrices

I have a list of matrices ...
-1
votes
1answer
1k views

Strange bug involving a list, “Objects of unequal length” [closed]

sortedTally is a list generated from Tally sortedTally[[1]][[1]] is a list If I print: <...
-1
votes
1answer
74 views

Help needed with assignment [closed]

Can I get some help with this: Write a module which as an input receives two matrices, the first matrix transforms in to the same matrix, but in the new matrix occur absolute values of the first, ...
-1
votes
1answer
203 views

Manipulate excel file and plot

I have a number of .csv files that have the following format: I want to do the following: ignore the last two rows sort all the remaining rows w.r.t the 2nd ...
-1
votes
1answer
83 views

Liquefying of Nitrogen & Oxygen Gaseous to Liquid Phase. Thermodynamics. How to plot solution? Solved [closed]

Process of Liquefying of air composed of 79% Nitrogen & 21% Oxygen from Gaseous to Liquid Phases as Follows: 1) When Temperature is higher than T>83 k they both are gas. 2) at T=83 k and less ...
-1
votes
1answer
51 views

Problem with Do [closed]

Good day, I want to assign some values in a list as in the following way: The problem is that when I run the program, it does not assign any value to alpha. Does anyone know why? Thanks for your help
-1
votes
1answer
60 views

Calculation with relations [closed]

I created set of realtions A = {{a -> b, c -> d}} and I want to check which number is bigger in these pairs. I have no idea how do it.
-1
votes
1answer
60 views

How to build a Table adding one or more values different from those defined by Table options? [closed]

Imagine I wanted to add a value 0.3 to the Table. How would you do? ...
-1
votes
1answer
85 views

Print to video permutations [closed]

You want to print vectors with $n$ elements, where: the first element can have the values: $e1.1, \, e1.2, \, e1.3$; the second element can assume the values: $e2.1, \, e2.2, \, e2.3$; ...; ...; the $...
-1
votes
1answer
92 views

generating random algebraic matrix using elementary operations

I generate several algebraic matrices of 12x12 where each element is a combination no repeat of the variables x, y, z and operations +, -, *, /, power, establishment (square root), any of them or any ...
-1
votes
1answer
114 views

How to graph the max and min values of a sheet?

Hi I just start working in Mathematica version 10.3.1 and I want to graph a sheet of data that I created in Excel (yeah i use Windows). The problem is i have so many data; 200 columns and 50 row of ...
-1
votes
1answer
117 views

Lattice model array for distribution of energy [closed]

Edited for clarity I am trying to make a 2-D array constant, lets say 100x100, and perform a function on that. The array would look like ConstantArray=[1,{100,100}]...
-1
votes
1answer
123 views

How to convert nested lists into “standard” lists? [closed]

What is the easiest way to convert a nested list in a "standard" list? For istance how can I fastly convert {{16.5807}, {17.1458}, {16.1343}} into ...
-1
votes
1answer
42 views

Reading numbers [duplicate]

I need to convert base 10 number say a in base 2 say b and want that, from now b must be read as a base 10 number. In general, I need to convert base 10 number say a in base n say b and want that, ...
-1
votes
1answer
154 views

Beginner Question: Assigning an indexed Variable to a given list

I am pretty new to the game and have a problem, which i am sitting on for hours. 1) I created a random Matrix 5x5 Q=Table[Q[i,j]=RandomReal[{0.6,1}],{i,5},{j, 5}] ...
-1
votes
1answer
204 views

Plotting the results of a system of equations

I believe this is a question of more list manipulation than plotting, but I hope you could help me. I solve numerically a system of equations of 3 variables, take only real solutions where one of the ...
-1
votes
1answer
405 views

Efficient Table Generation & NDSolve Error

I'm currently working on solving an SEIR model with data from the CDC. I've created a function to calculate the Square difference for the model and want to create a table of values for the 4 variable ...
-1
votes
1answer
58 views

Picking phase terms out of an exponential

I need to pick out certain terms from a sum of exponentials. For example, in the sum below: $a + b e^{i\,\Delta\,t} + c e^{ i( (\Delta + \Omega) t + \varphi_{0})} + \Delta e^{i\,\delta\,t + \varphi_{...
-1
votes
1answer
51 views

How to use Table function with two parameters executed when they are not equal? [duplicate]

I have a list, param2 = { {-qlim, -qlim}, {-qlim, qlim}, {qlim, -qlim}, {qlim, qlim} }; and want to get combination of them with, ...
-1
votes
1answer
95 views

How to construct a matrix composed of a subset of column of multiple .cvs files

Suppose I have a lot of .cvs files in a directory. All have the same structure and the first column is a column of dates --- their length is not necessarily equal. For instance, say I have two files ...
-1
votes
1answer
41 views

Take a scaled or proportional amount of a list

Is there a built-in method to do something like Take[list,Scaled[.7]]?
-2
votes
3answers
110 views

Multiply equations in lists

list = {x + 1, x - 3, {x - i, x + i}} The last two elements should be multiplied. Desired output is: {x + 1, x - 3, x^2 + 1} ...
-2
votes
1answer
101 views

Comparing records in a data set represented as a two level list

I have a data matrix I wanted to compare data inside it with itself. it's an easy task First my Data looks like this: ...
-2
votes
1answer
80 views

Creating a matrix and plotting its columns with legends [closed]

I have 2 questions: Question 1: val = Table[10 i + j, {i, 4}, {j, 3}] ...
-2
votes
1answer
53 views

Mathematica Plot [closed]

How can I plot List in Mathematica
-2
votes
1answer
614 views

Tweaking a code for basins of attraction

NOTE: Whoever finds a working way for obtaining the basins of attraction in the $(x,\mu)$-plane will add his/her name along with @Quantum_Oli in the list of the acknowledgements of the resulted ...
-2
votes
1answer
90 views

Create a matrix by crossing a list

I've a list L of elements. I want to create a matrix by laying each elements of L in both rows and columns where each ...
-2
votes
1answer
170 views

How can I produce a list of solutions for a function which is updated with updated variables using for loop?

I need to loop over a set of equations, solving for X and adding the new X value to the old X value at each step. The output I need is a list ...
-2
votes
1answer
100 views

Using Product for different variables

when using product in mathematica the initial and maximum value of the product will be the variable itself that will be maupulated. what I need is to make these initial and maximum of the product as ...
-2
votes
1answer
44 views

From a data set, print a new set with some conditions [closed]

I have a set of 16 vectors ($P[i]$), where $i=0,15$. Among them few are equal. I want to print all $P[i]$'s such that they are not same. Like $P[0]=\{0,1,2,1,0\}$, $P[1]=\{0,1,0,0,0\}$ and $P[2]=\{0,1,...
-2
votes
1answer
312 views

Add a given scalar to every element in a list [closed]

I wish to add a give scalar to every element of a list. How can I do this? Thanks in advance.
-2
votes
1answer
76 views

Jumping from one dimension (1D) to two dimensions (2D) Part II

Here is a sample data file data = {{-10,3,1},{-7.5,12,3},{-1.5,5,2},{2,4,4},{3,7,4},{6,9,5},{7,1,5}, {8,3,1},{9,12,2},{10,8,5}}; The first element of the list ...
-2
votes
1answer
763 views

Non-regular grid data

I have issue with non-regulary spaced data. I have set of 3 numbers {x, y, z} in my list. ...
-2
votes
3answers
142 views

Applying a function to a list with fixed intervals and fill the resulting list [closed]

I want to apply a function f to a list with fixed intervals, and then fill the gaps of the resulting list, as shown in the following picture. Since it will be run ...
-3
votes
1answer
47 views

Performing loop operation (average on lists of datas) of strings of datas [closed]

Lets say I have 100 CSV files of two columns data in each file, and I want to calculate the average of the 2nd column of each CSV file and then save all all these 100 averaged values in one CSV file (...
-3
votes
1answer
101 views

Plotting randomly generated points [closed]

I am trying to generate 100 random points of variables mf1 and msc1 and calculate mhiggs. I ...
-4
votes
6answers
924 views

Extracting the integers from a list

I have a list where the elements are Reals and Integers. How can I extract the Integer? For example, if I have {1, 2, 3.4, 9.9}, how can I get ...
-4
votes
1answer
210 views

Why doesn't Thread always thread? [duplicate]

What is the rationale for Thread not threading as a side effect if the arguments of the function to be threaded can be fully evaluated? For example, ...
-4
votes
1answer
149 views

How to sort my list? Help [closed]

I have a list={1,2,3,4,5,-6,9,3,12,0,-3}. I want to sort its, as way {even,odd,even,odd,....}. Moreover in crescent way for even and odd numbers. So the result ...
-4
votes
1answer
105 views

Extracting rows from a table / dataset based on arbitrary ordering function

Please look at the following clip of data. Suppose it is from a huge data set containing 100 variables x 10,000 names: ...
-5
votes
5answers
844 views

Translating MATLAB's cell2mat into Mathematica

How I can define a function in Mathematica such that it acts same as the cell2mat command in MATLAB? Example (in MATLAB): ...
-5
votes
3answers
554 views

Constructing lists by applying functions to another list

Suppose f is a function of two variables: $f = f(x,y)\quad$ and $L$ is a list. Could someone help me in defining a list of the form: $D = \{f(x,y)\ |\ x \in L,\ y \in L\}$ I tried this: ...
-5
votes
1answer
1k views

Split dataset based on the first column [duplicate]

I have a dataset which I want to split based on the first column. The data looks like this ...
-5
votes
1answer
74 views

Arranging Columns in a Matix

I have this matrix and this matrix how can I join those matrixes to one matrix where first column from 1 is the first column and the first column from the second matrix is the 2nd column and the ...