Linked Questions

0
votes
0answers
86 views

subtlety of self-defined function and its evaluation [duplicate]

I wrote a simple code as follows f[x_,y_]:=NIntegrate[x+z,{z,0,1}]; g[x_,y_]:=NIntegrate[y+z,{z,0,1}]; VectorPlot[{f[x,y],g[x,y]},{x,0,1},{y,0,1}] then ...
526
votes
19answers
130k views

Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
23
votes
2answers
968 views

Where can I get detailed information on how the Plot command works?

The command Plot[x^2, {x, -3, 3}, PlotStyle -> Arrowheads[{-.025, .025}]] /.Line -> Arrow produces this output. What I don't understand is what ...
26
votes
3answers
764 views

How can I make Plot show the plot while it's computing it?

Normally, Plot acts like a black box and only gives you the requested plot once it has finished computing it. However it can be useful, other than interesting, to ...
15
votes
2answers
2k views

How to obtain adaptive sampling as in Plot function?

Adaptive sampling in Plot function can capture the oscillation of a function with very few points. How can I get a similar sequence of point pairs without using <...
10
votes
2answers
782 views

Interpolating an Antiderivative

I'd like to be able to make InterpolatingFunctions for antiderivatives of functions that can't be integrated symbolically. However, the following code returns ...
6
votes
3answers
575 views

LogPlot does not show all points

LogPlot ignores points which are going to "too high" values: ...
1
vote
2answers
5k views

“not a list of numbers” and “cannot be used for replacing ” [duplicate]

I am trying to plot a function which is based on the solution of some equation; I could get the correct figure but only after lots of warnings are printed out. The following is a minimum version of ...
6
votes
2answers
280 views

Choppy curves with Manipulate [duplicate]

While manipulating the slider in Manipulate[], I experience choppy curves. These do however render correctly after letting go of the slider. The same phenomenon occurs when pressing the + or - button ...
2
votes
2answers
184 views

Result of NIntegrate ploting to list

I've been working on a project where I need to make two Plots. Those plots are of the form: ...
3
votes
0answers
799 views

Why is my Plot3D not smooth? [closed]

Unless I'm missing something very obvious, why does this code: Plot3D[r^(-2) + 1000*r^2 + 10*Cos[x],{r,0.01,0.5},{x,0,20*Pi},PlotRange->{0,200}] generate this ...
8
votes
1answer
108 views

Mathematica Plot Recursion Accuracy

Mathematica has the neat feature to sample the domain of a plot function adaptively, using recursion on a mesh in the function's domain. The set of initial points is controlled by ...
4
votes
1answer
132 views

Unexpected Behaviour at Plotting Floor with Plot [duplicate]

I wanted to plot a function involving Floor, here is my code: epsilon = 0.1; f[t_] = Floor[t/epsilon]; Plot[{f[t]}, {t, 0, 5}] ...
2
votes
1answer
138 views

Problem with code from Stan Wagon's book [duplicate]

Stan Wagon's Third Edition of Mathematica in Action has this code on page 30: ...
1
vote
1answer
164 views

Plot glitch when plotting highly oscillatory function

I've been trying to solve an ODE as shown below. The solution is correct. However, while trying to compare the Mathematica solution to the solution I had found by hand (which was not simplified), I ...

15 30 50 per page