Tagged Questions

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

0
votes
0answers
26 views

Wrong results from a branching function (ternary channel) [duplicate]

I'm doing one ternary channel and using the following code: ...
2
votes
1answer
93 views

Getting errors when I try to evaluate code taken from Trott's Mathematica Guidebook for Graphics

I would like to learn how to make high quality images in Mathematica. In my pursuit, I have come across Michael Trott's Mathematica Guidebook for Graphics. I have been trying some of the examples, ...
0
votes
2answers
83 views

Replace $z$ with interpolated function and plotting

I start off with this equation $z(x,y) = sin(xy)$. I create an interpolation from $0 < x < 5$ and $0 < y < 5$. I then use this interpolation on a simple function $w(x,y) = x + y + z(x,y)$ ...
0
votes
0answers
60 views

Discontinuous Forcing for a Cancer Model — Issues with v9 NDSolve

I'm new here, so please be gentle with me and hopefully the post is appropriate and not too basic. I am a math teacher and use modeling in my courses. I had working code (in v8 of Mathematica) for a ...
3
votes
1answer
165 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
42 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
147 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
157 views

Create Table of replacement rules

I want to create a table of replacement rules. ...
0
votes
1answer
67 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
463 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
237 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
116 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
118 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
229 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
208 views

Weighted mean of complex exponential function using NIntegrate

I have defined the following functions: ...
1
vote
2answers
139 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 ...
3
votes
1answer
174 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
206 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
121 views

Reuse a dynamic list [duplicate]

Consider this Dynamic list ...
2
votes
2answers
410 views

EdgeRenderingFunction question

Bug introduced in 9.0 and fixed in 10.0.0 (Edit 1 : I added this paragraph after the original post, for context) Some context for this question can be found in another post ...
0
votes
1answer
112 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 ...