Questions tagged [sublist]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
38 views

How to apply color gradient in listplot based on the density of points

I have a list of points ( a list with sub lists which are {x,y} coordinates. I would like to have a listplot where the areas with higher density of points are in darker colors and areas with lower ...
0
votes
2answers
104 views

How to do two different kinds of binning for a given list of elements?

I have a long list consists of float numbers with some of them duplicated as shown below. I want to divide this list into bins; with equal bin width so that in each bin there might be one or more ...
6
votes
2answers
116 views

Split in non-overlapping sub-lists with elements within an interval from the first member

I want to split a large ordered list into consecutive non-overlapping sub-lists, such that all elements are within an interval from the first member of the sub-list . For example: ...
0
votes
1answer
41 views

Do or For cycle to have more than ListLinePlot

I have a generic function: f[a_,b_]:=Module[{e,f,g,h}] which returns the scalar g and the list ...
0
votes
0answers
32 views

How to Flatten a list to use the inner lists inside Sum [duplicate]

I have the following list: list = {{i,0,2},{j,0,2}}; I want to use the sub-lists into Sum as ...
1
vote
2answers
44 views

combine two list based on a unique value in both list

Problem: I want to add a column-value from list A into list B based on a unique value in both list. The unique value in both list is not the same column. Both list have a different structure. for ...
3
votes
1answer
51 views

Rows within a norm

Is there a way to take a matrix and select the rows (or columns) with norm lesser than a certain amount max. Thanks
4
votes
1answer
82 views

sub list of given positions

Consider r = Array[Total[{##}] &, {3, 3}] (*{{2, 3, 4}, {3, 4, 5}, {4, 5, 6}}*) pos = {{1, 1}, {2, 2}}; This r[[pos]] ...
1
vote
2answers
39 views

How can I use Part Assignment to change sublists into other sublists (without changing levels)?

Here's a 5x5 grid. Using predefined starting points, I'd like to change some sublists into something else (e.g., the values for a color, "drawing an opaque box"). ...
3
votes
1answer
73 views

Remove or delete elements

I have the following list: ...
5
votes
2answers
143 views

How do I replace specific sequences of a sublist without changing the level of the list?

Suppose I have a list of multiple sublists: testlist={{1,1,1,0,0,0,1,1,1,0,1,1},{1,0,0,1,1,1,1,0,1,1,1,0}} I want to replace given sequences without creating new ...
1
vote
1answer
96 views

Comparing and Modifying two Matrices (list of list)

I need to compare two matrices with the same number of columns but a different number of rows (please see an example of Matrices A and B). I would like to know how I can compare the second column of ...
0
votes
2answers
64 views

Applying Map function on specific arrays of nested list

The output of a part of my scripts can be a list of list (e.g ccmppp1) or a list (e.g ccmppp2). I am using the following script to find the Root mean square of the nested list which is applied on the ...
2
votes
1answer
72 views

Finding points located in a specific locations of a 3D objects

I have the following list of points in 3D and would like to find the points which are located on the lower edge of the object and on (or closest distance to) the X-Y or Y-Z plane of the symmetry. (...
3
votes
2answers
159 views

Position of Nearest in sublist

I want to get the position of nearest value or the position of the value in a certain range. When I have the list, such as ...
5
votes
3answers
122 views

How can I add or remove the element in the sub-lists, whose length are different?

If there are lists with different lengths of sublists like below, ...
2
votes
1answer
92 views

export and import of 3D arrays

I have a very large (up to 1 Mio elements) 3D array A = {{{1,2,3,4},{5,6,7,8}},{{9,10,11,12},{13,14,15,16}}, ......, {{....},{....},{....}}} which I want to Export ...
5
votes
3answers
230 views

How do you selectively flatten a sublist in a given list?

I have a list that looks something like: d={{{1}},{{2}},{{3},{4}},{{5}},{{1},{8}}} Is there a generic way to use flatten so that you can selectively target ...