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
3answers
400 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
159 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
73 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
83 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
105 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
201 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
177 views

Weighted mean of complex exponential function using NIntegrate

I have defined the following functions: ...
1
vote
2answers
105 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
72 views

Difference in two codes

When I check the following for the Fibonacci sequence, there is no problem: ...
1
vote
0answers
119 views

Optimization of power tower fractal generator

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
189 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
108 views

Reuse a dynamic list [duplicate]

Consider this Dynamic list ...
1
vote
2answers
281 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
103 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 ...