# All Questions

121 questions
Filter by
Sorted by
Tagged with
40 views

### Get subscripts of sum of expression and save each summand's subscript separately

I deal with expressions like A= a_i a_j a_k + a_i a_l a_m+ ... where the a_i notation is shorthand for Subscript["a",i] and all subscripts are integers. In this ...
50 views

### Delete elements form a list with elements with strings and numbers

I am trying to create a list list2 removing elements from a list list. The structure of list...
28 views

### Count the number of words in WordList that start with a “q” [closed]

How can I create a subset of WordList[] that contains only the words that start with "g"?
46 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 (...
73 views

### How to generate letters for multiple people from a list of names

I need to generate many letters of invitation from a list of people. I thought this would be already asked/answered in this forum, but I can't find anything useful. Basically, I need to write a letter ...
74 views

### Comparing strings within a list of strings

I have a single list containing strings like this: list={"house", "cat", "dog" ,"horse", "horses", "tree"}; How can I compare these strings within a list and ...
156 views

### Commonest[] function doesn't actually show commonest elements

I'm using Commonest function on a list with 500000 words to get the 10 most frequent elements. Then by using WordCloud, I found ...
55 views

### comparing lists of strings

I have two lists of strings like this: ...
60 views

### Creating a table in a while loop

I am probably missing something obvious, but I am stuck. I am writing a code on Mathematica for Newton's method, and I need to print out a table for the iteration, approximation root, residual, and ...
110 views

### Deleting unwanted elements in lists of words

I have imported Alice in Wonderland into Mathematica. I have made a list of the sentences and further divided them into words. Now suppose, nominally, I have the following list: ...
200 views

### Selecting elements from lists based on string pattern

I have a list: lis = {{"abc", 1, 2}, {"cde", 3, 4}, {"fgbc", 5, 6}} I would like to select list items that have first elements that end in the string "bc" to ...
54 views

### Modification to the list of string

Suppose we have a list of the following: l={"applejuice","lemon_juiceginger"} How can one modifies this to read as: ...
62 views

### Manipulation of two lists of strings and integers

I have the following lists: ...
76 views

### String Join but not fully

Suppose I have the following string list: l={{"a","dog"},{"the","pen"}} how can I turn this to {{"a dog"},{"the pen"}} I ...
109 views

### Finding the frequency of letters in a string

Given the following string: ...
59 views

### Selecting elements using two lists

I made the following list: ...
158 views

### Selecting an element of a matrix that contains specific string

I have the following matrix: ...
103 views

### What changed in String handling between 11.0 and 11.3?

I was trying to optimize some String-handling code here using my standard trick of converting it to a list of bytes first and using basic list operations instead of ...
127 views

### List rearrangment with joining of strings

I have a list of strings: lis = {{"a","b","x"},{"d","e","y"},{"a","b","z"},{"d","c","x"},{"a","b","w"}} I would like to use StringJoin on the last elements where ...
92 views

### How to remove adjacent date strings in a list?

Given a list as list = {"2018-9-1",1,2,3,"2018-9-2","2018-9-3",4,5,6,"2018-9-5",7,8,9,"2018-9-6","2018-9-7",10,11,12,"2018-9-8",13,14,15,"2018-9-9",16,17,18} or ...
460 views

### Loop over a list of strings and increment letter count in a corresponding sublist

I have a 2D list as follows: ...
426 views

255 views

### Splitting nasty list FAILED

I am still a beginner with Mathematica and I have a simple problem with splitting this list: ...
110 views

### Extract values from a string list with string elements like “ Id=\”1\“ ”

I have a simple problem which I am not able to work around. I have this list ...
64 views

The data: ...
560 views

### StringJoin with Spaces

I'm having some trouble using StringJoin --- the problem is that the StringJoin function creates a string where all the words in a list are combined without any spaces (whitespace) For instance, list ...
4k views

### How to Output Lists without Commas or Brackets?

When trying the below code, is there a more elegant way to output the numbers without the commas or brackets? Grid, as suggested in other threads, is not behaving ...
392 views

### Deleting certain elements of a list

This query is similar to a question I posted earlier. Given testList = {{"a", "b 3", "cd", "ef 23"}, {"z 12", "y", "x"}, {"z", "y"}, {"a", "b3"}}; I would ...
166 views

### Eliminating items from list by rule

I have a list: testList={{"a","b 3","cd","ef 23"},{"z 12","y","x"}} and wish to obtain resultList={{"b 3","ef 23"},{"z 12"}} ...
68 views

### Convert Negative Integers into Signed Binary?

I'm relatively new to Mathematica and have been struggling with this problem for several days. I have a string of integer data, ranging from -2044 to 2044. So this looks something like {-2044,-2040,-...
265 views

### Dataset, use list as header

I have a dataset with a header for row and column which consists of binaries, e.g.: ...
103 views

### Parse large ASCII matrix

I am parsing a large ASCII sparse matrix, output of PETSc, but my current implementation is impossibly slow. I don't know how I could speed that up. The ASCII file of a sparse PETSc ...
582 views

### How to Add strings into each element of a list [closed]

This is a rather basic question but as I am new to programming, I have been stuck on it for a little while. I am trying to add strings to the beginning and end of every element in a list (each element ...
76 views

### Isolate first order elements

How can I isolate only the first order "h" terms in the following expression? ...
162 views

### Getting the value of sentences

I have a list, importance, that assigns a "value" to each word in some text, like such: { {the, 0.9}, {and, 1}, {red, 2.1} } ...
291 views

### Element combinations

I have a list: lis = {"ab", "cde", 2,"rs",3,"tu","v","w",7} and would like to get the following list: ...
189 views

### List of symbols wherein position encoded by number to string

How to transform list wherein position of the symbol encoded by number at second position {{a,6},{z,1},{g,2},{y,12}} to string ...
95 views

### Get alphabetical number of characters in string

Given a string such as "abcdefghijklmnopqrstuvwxyz", how would I go about returning a list of the alphabetical number of each letter in the string, example being <...