Use this tag only if you did your research and you still don't know why your syntactically correct code does not work.

learn more… | top users | synonyms

3
votes
1answer
136 views

Issue in ParallelTable after evaluating another function using NDSolve and FindRoot. What is wrong with this inverse?

I am trying to find the inverse of a function which is defined through NDSolve and NIntegrate. The question is pretty similar ...
0
votes
1answer
38 views

Why my if statement does not work [closed]

Thanks for your attention. I'm new to mathematica. I have the codes as below. But the If statement does not work. Anything wrong with my code? Thanks for help! Ben ...
1
vote
1answer
136 views

Error message: Coordinate index 0 is out of range for the enclosing GraphicsComplex

I am unable understand following error message: Coordinate index 0 is out of range for the enclosing GraphicsComplex. How to fix it? Attached data here: pts and polygons. See also end of question. ...
2
votes
2answers
140 views

Create Table of replacement rules

I want to create a table of replacement rules. ...
0
votes
1answer
63 views

What's going wrong with this button! [duplicate]

I'm implementing an Adaline algorithm where all inputs are 1x5526 and the output is a number from 1 to 10. I have this two functions defined and worked outside the ...
3
votes
3answers
440 views

For-loop not working as I expect

I want to do this: When 10 <= t < 130, give t -> 1; When 130 <= t<300, give ...
-5
votes
1answer
189 views

How can I plot a function that is the sum of another function?

I plotted m[t], but actually what I want to plot is g[t], which is a summation of m[t] from ...
4
votes
1answer
101 views

Why Min cannot be used as constrains of NMinimize?

I met a strange problem when trying to do an optimization. Initialization code, ...
3
votes
1answer
89 views

some confusion about ReplaceRepeated

This is Right. NestWhile[Log, 100, # > 1 &] {100} //. {x_} /; x > 1 :> {Log[x]} 100. //. x_ /; x > 1 :> Log[x] This is wrong,why? ...
0
votes
0answers
115 views

Solving simple ODE for eigenvalues causes nightmares

I had some code which could solve an ODE for the function $u$ and the eigenvalue $E$. Unfortunately, $E$ is a function of another parameter $k$. This meant, that upon solving the equations, I had to ...
0
votes
1answer
217 views

updating code from 5.0 to 9.0

I am updating a code from a 5.0 version to a 9.0 version. I am speaking about "Advanced visual quantum mechanics". There is a package with this code: ` ...
2
votes
2answers
195 views

Weighted mean of complex exponential function using NIntegrate

I have defined the following functions: ...
1
vote
2answers
124 views

What's the wrong when I use NestWhileList?

Problem : A Happy number is a number that if one squares its digits and add them together, and then take the result and square its digits and add them together again and keep doing this process, one ...
0
votes
0answers
74 views

Difference in two codes

When I check the following for the Fibonacci sequence, there is no problem: ...
3
votes
1answer
160 views

Optimization of power tower fractal generator [closed]

I tried to optimize the code for generating power tower fractals from here. As the author suggested, I tried to memorize the points already tested in a list. Here is my code : ...
1
vote
1answer
195 views

What's wrong with my code for finding primes?

From here I found a fast method to make prime list, the python version works well, but my Mathematica version does not. Obviously ,169 is not a prime number. What's ...
0
votes
1answer
117 views

Reuse a dynamic list [duplicate]

Consider this Dynamic list ...
1
vote
2answers
334 views

EdgeRenderingFunction question

(Edit 1 : I added this paragraph after the original post, for context) Some context for this question can be found in another post (Problem with EdgeRenderingFunction), which however may be taken ...
0
votes
1answer
107 views

How do I use a while-loop to find the gain of a transfer function's limit?

At the moment I can find the limit of my transfer function as follows: (5 4001.6`)/(5 4001.6` + (4 + s) (200 + s)) /. s -> 0 This works as I would expect and ...