Linked Questions

0 votes
1 answer
8k views

How do I store values in a for loop into an array and then plot that array? [duplicate]

What my title said and I want to plot the values of the array. still new to mathematica and programming so its hard to formulate my question just right
user13842's user avatar
0 votes
2 answers
4k views

Assign the output of a loop [duplicate]

Possible Duplicate: Creating a table/Matrix during a For loop Yet another simple question. ...
Darwin's user avatar
  • 5
1 vote
2 answers
1k views

Specifying an array that may have an unknown number of entries [duplicate]

Say I'm running some process of unknown duration, and during the process, I need to periodically record the state of some variable. If we knew exactly how long the process took, we could simply ...
110110's user avatar
  • 267
1 vote
3 answers
251 views

Loop Outputs as Lists [duplicate]

...
Terrence Kelleher's user avatar
-1 votes
1 answer
474 views

Exporting Data file in .dat format [duplicate]

Here I'm solving two simultaneous to get different values of the roots depending upon another variable 'x'. I've written up to the following using 'Find Root' ...
Doon's user avatar
  • 319
0 votes
0 answers
39 views

Create a (maybe nested) list of nminimize solutions in a loop [duplicate]

I'm a total newbie in mathematica, so need some help. I understand that my question is about basics, but i couldn't find the answer in docs, google and here. Here is what i'm trying to do. ...
shda's user avatar
  • 253
41 votes
8 answers
3k views

Can this be written well, without loops?

Inspired by this question I would like to know if the following code can be written without explicit loops (For, While, etc.) in a clean, efficient and non-contrived way. I have been unable to do so. ...
Mr.Wizard's user avatar
  • 270k
60 votes
5 answers
7k views

Are there any cases when For[] loops are reasonable?

To my mind the only reason for the existence of For[] loops in Mathematica is to allow new users with some experience in procedural programming languages to write ...
faleichik's user avatar
  • 12.6k
12 votes
4 answers
8k views

Delete duplicate elements from a list

If a list contains duplicate elements, for example list = {a, 1, 5, 3, 5, x^2, x^2}, how can the duplicate elements be removed? The result would be ...
sjdh's user avatar
  • 7,607
3 votes
2 answers
12k views

Creating Lists From Loops

Consider the following: lists = Import["G:/Notebooks/Lists.csv"]; col7 = lists [[All, 7]]; For[i=0,i<101,i++,Print[Count[col7,i]]] This will get a 100 cells ...
Sinistar's user avatar
  • 1,029
1 vote
2 answers
1k views

counting number of outputs in For loop

I am using For loop and If within it. For example: ...
user31694's user avatar
  • 189
2 votes
2 answers
234 views

Efficient List of Lists

I'm running some analysis that requires the creation, row by row, of a large list of lists. The big list is called "Nodes" and it will ultimately contain hundreds of thousands of rows. The first few ...
JCH's user avatar
  • 33
1 vote
0 answers
90 views

DeleteDuplicates Delete elements of a list [duplicate]

I have a math problem about Mathematica, I am looking help from you. I hope that you could help me. The Math Problem: list= { {0,0,1},{1,0,0},{0,1,0} ,{1,2,3}}; ...
YuYong's user avatar
  • 129