Tagged Questions
1
vote
1answer
66 views
Issues with creating functions [duplicate]
Sometimes when I try to create a function inside a function, Mathematica gives me a hard time. I usually just have to play around with the syntax until it gets something it "likes" but I really have ...
0
votes
1answer
72 views
Nested function problem [closed]
I have trouble defining the following function in Mathematica
sp[M_, u_] := 1/Sum[u^k M!/(M - k)!, {k, 0, M}]
After defining it Mathematica displays an error. ...
22
votes
4answers
204 views
How can the behavior of InterpolationOrder->0 be controlled?
In ListPlot and Interpolation, the option InterpolationOrder->0 uses two different ...
3
votes
1answer
79 views
plotting hypergeometric functions
Does anyone know why a plot of a hypergeometric function turns out differently in Mathematica than in Maple?
The function I'm plotting between x=-30 and +30 is:
...
-1
votes
1answer
277 views
Why won't my function show in my plot? [closed]
I defined a function f as
f[x_] := x^3/(x^2 + 1);
and a function F as
...
-1
votes
2answers
103 views
How do I generate a table of data points from a function and add random noise? [duplicate]
I am trying to generate a table of data for the function:
...
2
votes
2answers
106 views
Restarting an Animate[] animation after variable in Manipulate[] changes
I've been trying to restart an animation after variables change from Manipulate PopUpMenus. My animation takes the form:
...
1
vote
1answer
284 views
Mathematica plots a discontinuity in piecewise function that does not exist [duplicate]
I have the following function defined:
...
0
votes
1answer
288 views
How do I define the domain of a function?
I have a function of two variables, f[x_, y_], and I would like to restrict the domain to values of x and ...
1
vote
1answer
260 views
3D plot of two 2D functions
I would like to plot two 2d functions in a 3d coordinate system. Examples are z = x^2 and z = y^2. Each function has one ...
0
votes
0answers
27 views
How does Plot evaluate its argument? [duplicate]
I have a list of about twenty InterpolatingFunctions that I'd like to plot. They are interpolations from experimental data (frequency spectra between 100 and 5000 ...
1
vote
1answer
228 views
Plotting a complex function [duplicate]
What does it mean if this message appears:
{Im[(1-E^Times[<<3>>] f)/(1-Power[<<2>>] f)]-0,Im[(1-E^Times[<<3>>] f)/(1-Power[<<2>>] f)]-0} must be a list of equalities or ...
3
votes
2answers
348 views
Define a color function using Piecewise
How can I define a ColorFunction for my ContourPlot using Piecewise? For example after ...
7
votes
6answers
337 views
Manipulate and Turning Expressions into Functions
I've been trying to use Manipulate to do interactive plotting, but I've been running into a few problems with saved expressions. I have an expression saved as "func" and I want to work with it and ...
2
votes
1answer
367 views
Calculating volume [closed]
I'm new in mathematica and I'm stucked on how I can get the volume of a solid created by the inequation:
...
2
votes
1answer
185 views
Plot maximum and minimum temperature of a day for range of time interval
How to display (in any graphic representation) the maximum and minimum temperatures for one city in one of these selected time periods over the 5-day period? The time periods are:
Morning (06:00 to ...
5
votes
4answers
268 views
Prevent Part[] from trying to extract parts of symbolic expressions
If you have a list, e.g.
{1, 2, 3}
then you can extract the $k$th part using Part (...
3
votes
2answers
976 views
Plot Even Piecewise function
Is it possible in Mathematica to plot an even piecewise function like:
$ f(x) = \begin{cases} 3t , 0 \le t \le \frac{\pi}{2} \\
3t + 6 , \frac{\pi}{2} \le t \le \pi \end{cases}$
which has ...
7
votes
1answer
274 views
Demonstrating Ackermann's Function
The Ackermann function is an extremely fast growing function. There are some slightly different versions of the function, but the one that I am looking for can be defined as:
$$
A_0(x)=x+1 \\
...
3
votes
2answers
214 views
Plotting two functions with dependent input function
I have defined a function:
myJ2[n_] := 1/n* Total[RandomVariate[NormalDistribution[0, 1], n]^2]
This is basically an approximation to the gaussian integral. I ...
8
votes
1answer
775 views
Using RegionFunction on multiple plots
I realize that the Plot function can plot multiple functions of x at the same time, using { }. I also know that the ...
6
votes
3answers
641 views
How do I plot Thomae's function in Mathematica?
I wanted to plot this function
$$f(x) =\begin{cases}
1 & \text{if } x= 0 \\
\tfrac1{q} & \text{if } x = \tfrac{p}{q}\\
0 & \text{if } x \in \mathbb{R}-\mathbb{Q}
...
6
votes
4answers
1k views
Plotting a simple relationship with Plot[] results in empty graph
I've moved this question over from StackExchange to get better visibility (and deleted the old question).
I have a user-defined relationship I'd like to plot:
...
2
votes
4answers
3k views
Calling Correct Function for Plotting DiracDelta
I am wondering what is the correct function in Mathematica to plot the true impulse function, better known as the DiracDelta[] function. When using this inside of a ...
7
votes
2answers
1k views
Series of piecewise functions
Let $f_{0}(x):[0,1]\to[0,1]$ be defined by
$$f_{0}(x):=\begin{cases} 3x, & \text{if } x\in [0,\frac{1}{3}] \\
\\
-3x+2, & \text{if } x\in (\frac{1}{3}, \frac{2}{3}] \\
\\
3x+2, & ...
16
votes
3answers
1k views
Plotting piecewise function with distinct colors in each section
I have a piecewise function that I would like to plot but I was wondering if it is possible that each part of the function that is plotted when its corresponding condition is true be plotted with a ...