50 views

...
49 views

### How to save matrices from each iteration of i? [closed]

I am trying to get the transformation matrices from DH parameter table and would like to save each matrix (Ai) getting after each iteration of i. How can I do that? ...
32 views

### Encountering error in For-loop, If statement and Print Function [closed]

I am encountering some error while trying to find roots of equation using Bisection method. In this method, you take an interval (a1,b1), here I have taken (0,1). If f(a1)f(b1)<0, then you take p1 =...
72 views

### Error in Assignment

I want to create a matrix with each element updated as per the formula, whose inputs are dependent on the location of element in the matrix. ...
38 views

### Two actions in the loop body

Help me please, how I can write two action in the body of the cycle "for"? For example, if I need to write Print[] and Append[] at each iteration.
42 views

### How to sort the “do” output?

So I have function (FindCoefficients) that iterates through some values to find the maximum value for a function. It is much quicker to hold the non-linear values constant and do a find maximum for ...
141 views

### Print characters from list with a For-loop

Suppose I have the list primary = {"b","a","e"} I want to get the following output with a For-loop (or While-loop) "b" "a" "e" My code is: ...
63 views

### Parallelizing nested for loops

I'm currently computing nested for loops. I count up a few counting variables and compute a value for each set of counting variables, then that value is added to an array. It is a way of adding up ...
344 views

### Dot products and For-loops

I'm taking a class where we're working with matrix applications inside of Mathematica. In this case, we're analyzing senatorial votes that have been numericized so that a value of 1 corresponds to "...
488 views

### Pascal records and Mathematica programming

Background: "experienced" Pascal-programmer (DOS-era, never got into OOP) proud owner of Mathematica ver 11.2 have used Mathematica for years to do my share of number crunching and plotting to ...
131 views

### Evaluating number of iteration with a certain map with While

Beeing used to programming in C-like languages I am struggling with iterations and loops with mathematica. I am trying not to use the For command, as already lots of people recommended. I am trying ...
188 views

### Correctly defining the return of a procedure

I am sort of new to mathematica and I am struggling with how to correctly set the return of a specific function which is a procedure. I am give the following task: Given the map \$x_{n+1} = r x_n (1-...
967 views

### How to speed up a process

I am wondering how to speed up the following code: Currently it takes more than two sec to be processed. ...