Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Questions on the manipulation of List objects in Mathematica, and the functions used for these manipulations.
2
votes
4
answers
174
views
Looking for mismatches between two lists
I'm able to do what I need, but it seems like there's always a better way. I have two lists, epiExcel and epiDB. Each has 3 columns and about 2,500 rows. I need to find out if the first 2 columns o …
2
votes
2
answers
148
views
Select words from different rows of column headings
I have a 2-dim array. The first 3 rows have column headings. The heading can be a single word, or 2 words (which take 2 rows) or 3 words (which take 3 rows). For each column I know which row has th …
5
votes
5
answers
203
views
getting at the right parts of a list
I have a way to solve my problem, but it seems like there should be something better. Also I realize that I probably don't have a good enough handle on how to get at parts of lists the way I need to. …
9
votes
9
answers
3k
views
combining and comparing lists
I have 2 lists (of lists), where most of the contained lists match. That is, the lists contained in list1 mostly match the lists contained in list2. In this simplified example each of the inner list …
4
votes
7
answers
146
views
Distributing identifiers
I have a list that looks like this:
{{"a",},{2010,0},{2011,10},{2012,27},{"b",},{2011,11},{2012,66},{"c",},{2010,19},{2011,20},{2012,}}
I want to turn it into:
{{"a",2010,0},{"a",2011,10},{"a",201 …
7
votes
Delete sublists containing exactly two positive numbers
If you meant to delete cases where there is only a pair of positive numbers:
DeleteCases[M, {x_ /; x > 0, y_ /; y > 0}]
11
votes
3
answers
347
views
Pick with nested list
I have a list of pairs of values. Some of those pairs are invalid based on another list. I would like to select only the valid pairs.
list1 = {"abc", "def", "ghi", "jkl", "mno"};
list2 = {{"abc", 1 …
32
votes
10
answers
6k
views
Apply multiple functions to same list
I'd like to get the Min, Max, Median, Mean, etc. for the same list. For now I'm doing the following:
y = {1, 2, 3, 4, 5, 6, 7};
Map[{Max[#] , Min[#] , Median[#], Mean[#]} &, y, {0}]
It seems like …
3
votes
Replace matrix rows conditionally while avoiding For loop
(myMatrix[[#, #]] = 1) & /@ myIndices;
6
votes
3
answers
507
views
Using Part rather than Extract
In my work I found that I needed the Extract function. However I was wondering if there was a way to use Part. Assume that mList is a 4-dim array.
I did the following, which worked.
x = {2, 10, 3, …
3
votes
3
answers
321
views
Converting a date to a calendar quarter
I have a list that includes dates. I need to convert each date to be the last day of the quarter that it's in. So for example I want {2013,7,1,0,0,0} to become {2013,9,30,0,0,0}. Actually I don't nee …
7
votes
2
answers
290
views
Allocate amount A according to the distribution of amount B
I have a cost that varies by category and date. I also have the counts of each item type within each category and date. I want to distribute the cost to each of the item types. I'm trying to use Gr …