Linked Questions
16 questions linked to/from How to plot periodic function's graphic?
6 votes
5 answers
1k views
How to add periodicity to condition? [duplicate]
Is it possible to set the following function f[a], where a can be any real number? $$ f(\alpha) = \begin{cases} 1 & \...
6 votes
1 answer
8k views
Changing a piecewise function into a periodic function [duplicate]
I have: f[x_] := Piecewise[{{x, 0 <= x < 1}, {2 - x, 1 <= x < 3}, {x - 4, 3 <= x < 4}}] Plot[f[x], {x, 0, 4}] Which produces this plot: I'...
1 vote
1 answer
5k views
How to define a periodic function from an interval to Play (monotonic) sound [duplicate]
I would like to define a function on an interval and then duplicate it on other intervals of the same length in order to define a (generally discontinuous) periodic function, from which I could get a (...
4 votes
4 answers
925 views
How to extend a function by period and display it [duplicate]
I want to extend this function into a new function according to its period Plot[-((E^x + E^(-x))/2), {x, -1, 1}, AxesOrigin -> {0, 0}] and then draw this ...
1 vote
3 answers
1k views
repeating a special type of square wave over time [duplicate]
I want to repeat the square wave shown in the picture over time after t=0.4 s, so the time period will be 0.4 s. And I want to repeat the same pattern over certain period of time, say 100 s. Anyone ...
0 votes
1 answer
609 views
Plotting custom periodic function [duplicate]
I want to plot a periodic function with following commands: x[t_] := 1 + t /; -Pi < t < Pi x1[t_] := x[Mod[t, 2 Pi]] Plot[x1[t],{t, -2 Pi, 2 Pi}] but in ...
2 votes
1 answer
1k views
Plotting a periodic function [duplicate]
My question is the following: how can I plot a function repeatedly? By following some topics here I found some basic information about using Fourier series. This is what I made: ...
0 votes
0 answers
41 views
Plot a Repeating Discontinuous Function over 'n' Periods [duplicate]
How would I get Mathematica to plot the above discontinuous function over any number of periods (or perhaps over any given range)? i.e. $0 \ to \ 6\pi$, or $-2\pi \ to \ 10\pi$ I have seen a few ...
0 votes
0 answers
40 views
Plot between range [duplicate]
I'm attempting to plot $4 \pi t$ between $[-\pi,\pi]$. I know of the PlotRange -> {-Pi, Pi}, but that cuts off the values outside of the range instead of ...
70 votes
10 answers
4k views
Injecting a sequence of expressions into a held expression
Consider the following toy example: Hold[{1, 2, x}] /. x -> Sequence[3, 4] It will give Hold[{1, 2, Sequence[3, 4]}] ...
4 votes
3 answers
960 views
Help on evaluation control?
I want to plot series of slopes: x, 2x, 3x, 4x, 5x, 6x... I'm trying to do this: ...
-2 votes
1 answer
698 views
A piecewise function with way too many pieces
I'm currently calculating a periodic square wave current function to feed into a particle accelerator. It's a square wave that ramps up to a certain frequency and then drops back to the base frequency ...
5 votes
1 answer
277 views
How to efficiently implement periodic function to reuse computed values
Assume I have a function f = Function[t, VeryDifficultComputation] But I would like to exploit the fact that the function is periodic to "cache" computations ...
2 votes
1 answer
353 views
Periodic boundaries for a 3D walk in a Bravais lattice?
I'm using a Bravais lattice, 'face-centered', which is implemented in Mathematica in LatticeData[]. I want to simulate a random walk over neighboring points using ...
1 vote
0 answers
510 views
Periodic boundary condition trick
I'm plotting a curve on a compact space which is having periodic boundaries on the left and right parts. Currently, the code I'm using is working great, but I'm wondering if there's a simpler and ...