1k views

### Error: in the part assignment is not a symbol [duplicate]

I am trying to set part of a Doubly-indexed list aInitialPopulation to cNumHeg. Specifically I am trying to set the 3rd part of the list aInitialPopulatiom[[cNodeNumber]] to cNumHeg. My (attempted) ...
657 views

### Forget past outputs to free memory [duplicate]

While tinkering with a notebook that loads a large chunk of data in memory, I noticed that if I run it multiple times, the past chunks reside in memory. I understand that the reason (or one of) for ...
782 views

### Replace doesn't replace the denominator [duplicate]

I have the following expression in Mathematica -((E^(2 - 2 Sqrt[(x[1] - x[2])^2]) (x[1] - x[2]))/Sqrt[(x[1] - x[2])^2]) I want to replace anything of the ...
162 views

### beginner's question: change a parameter while get variable answers [duplicate]

I'm new to Mathematica from R, since R is not quite good at dealing with the following problem. Say, i want to solve the function a x - 10 = 0. Each time I change the value of a, say, from 1 to 10 by ...
526 views

### Formatting: Removing semicolon at the end of a line introduces multiply symbol [duplicate]

Focus on those 4 lines in the middle of the screenshot of the code. There are lines above and below those 4 lines which are not necessary for our discussion. Issue: In the 1st of those 4 lines, I ...
671 views

### Change input variable in a function [duplicate]

I'd like to write a function, that would take a matrix as an input parameter and would change it by multiplying one of its rows by a factor. I try to do it in the following way: ...
403 views

### Check if an inequality holds among the solutions returned by Solve [duplicate]

Let's say I solve a system: Solve[{a == 3* c, b == 2 *a}, {a, b}] and then want to see if the values found for a and ...
302 views

### Mathematica syntax with combined Prefix and Times operator: @* [duplicate]

In a post on the Mathematica Community, Anton Antonov uses a syntax that I have never seen. It is the prefix function @ combined with the Times operator *. The combination appears to bind the ...
586 views

### What is the command for the shortcut _? [duplicate]

I was trying to look up what _? does but I couldn't find anything in the documentation and it's hard to look up symbolic strings because most search engines use these symbols internally.
1k views

### Fitting a Function With a Numerical Integral [duplicate]

I am having trouble using FindFit with the following function. ...
339 views

### Why does InverseFourierTransform gives different result to doing it by hand? [duplicate]

When I can calculate an inverse fourier transform by the built-in function InverserFourierTransform, the result is different from what I calculate by definition ...
291 views

### How to define a variable updating function? [duplicate]

I tried to program a Sudoku solver when I suddenly ran into this problem: I need a function which effectivley does this: ...
348 views

### Matrix multiplication for higher dimensional matrices [duplicate]

I have a matrix like this (myb1): I would like to get the matrix multiplication of each of the submatrix to itself. For example the first $2\times2$ matrix \$\begin{bmatrix}1 & 2\\1 & 2\end{...