Hi all I have the following code: For[i = 0, i < 98, i++, q = i*100; For[j = 102 + q, j < 2*100 + q, j++, Print[j]]] The output of this loop I wish to put in a list. Can you guys give me a hint to do that? Sincerely, Niles.
Follow Math Help Forum on Facebook and Google+
Ok, I just used Create Lists - Wolfram Mathematica 7 Documentation Mathematica is well-documented.
You can always define a help variable and replace with . At the end, just ask the program to return .
That solution was much nicer than mine; thanks. Do you know if it is possible to perform multiple tasks in an if-condition? I.e. If[2>1, Do this Also do this Also do this and this, Else only do this ] ?
Of course: If [ Condition, Action 1; Action 2; Actions 3; ... ; Action n]. Just separate the tasks by ; and keep the , for telling the If what to do should the condition fail to be true.
Thanks, I appreciate it.
View Tag Cloud