Questions tagged [sublist]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6
votes
2answers
83 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
31 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
40 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
81 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
37 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
71 views

Remove or delete elements

I have the following list: ...
5
votes
2answers
134 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
94 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
71 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
144 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
118 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
79 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
225 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 ...