89 views

### How to get a number, but not a list, of the dimension of your array?

I need to use the dimension of a certain array, to use it as a bounder in a loop afterwards. The problem is that I get a list, when write : ...
4k views

### Loops and subroutines [duplicate]

Possible Duplicate: Alternatives to procedural loops and iterating over lists in Mathematica I am new to Mathematica and not familiar with functional programming. In particular, I have no idea on ...
77 views

### Help needed with assignment [closed]

Can I get some help with this: Write a module which as an input receives two matrices, the first matrix transforms in to the same matrix, but in the new matrix occur absolute values of the first, ...
257 views

### efficient writing, matlab vs mathematica [closed]

I would like to implement in mathematica, this simple matlab loop: c(1)=5; for i=2:10 c(i,:)=c0*i; end The point is that pos has an initial value and updates ...
159 views

### What are some general strategies to avoid using For loops? [duplicate]

Possible Duplicate: Iterating over lists in Mathematica While there are some cases where a For loop might be reasonable, it's a general mantra – one I ...
91 views

### How to delete lines containing specific values from a matrix? [closed]

I am doing some numerical computations and a few iterations return values that are obviously incorrect (some numerical integration problem, I suppose.). I have managed to set these values to zero but ...
117 views

### Want explanation of when different looping constructs are appropriate [duplicate]

For example when would you use a Do loop over a For loop? For which tasks would you use Map, ...
30 views

### How to speed up this code (finding eigenvector with smallest eigenvalue)? [closed]

I have following code. The function TraceSystem is to take partial trace of matrix and I think this part is fine. The main code is below in dd and I think the main problem is in here for Eigenvector. ...
163 views

### loops in one loop, [closed]

I'm new Mathematica user. I try for loop but it didnt work. I used ...
89 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}}; ...
32 views

...
57 views

### What techniques have you employed to avoid loop in Mathematica? [duplicate]

It appears to me that loop in mathematica is very slow (compared with matlab). Since many people still use mathematica to finish their work, there must be some techniques to bypass this problem. ...
49 views

### Solving for limit of integration with a piecewise function (FindRoot vs NSolve) [duplicate]

I am trying to solve for the limits of integration using a piecewise function. I'm doing this in a loop over a list of data, mostly because I'm not well-versed enough in Mathematica to make this a ...