Linked Questions

6 votes
5 answers
1k views

Is it possible to set the following function f[a], where a can be any real number? $$ f(\alpha) = \begin{cases} 1 & \...
mikeonly's user avatar
  • 439
6 votes
1 answer
8k views

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'...
David's user avatar
  • 15.1k
1 vote
1 answer
5k views

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 (...
marfi's user avatar
  • 115
4 votes
4 answers
925 views

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 ...
A little mouse on the pampas's user avatar
1 vote
3 answers
1k views

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 ...
Ahmed Mamdouh's user avatar
0 votes
1 answer
609 views

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 ...
mohammad's user avatar
2 votes
1 answer
1k views

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: ...
István Sikari-Nágl's user avatar
0 votes
0 answers
41 views

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 ...
Paul Shaw's user avatar
0 votes
0 answers
40 views

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 ...
cdignam's user avatar
  • 101
70 votes
10 answers
4k views

Consider the following toy example: Hold[{1, 2, x}] /. x -> Sequence[3, 4] It will give Hold[{1, 2, Sequence[3, 4]}] ...
Szabolcs's user avatar
  • 239k
4 votes
3 answers
960 views

I want to plot series of slopes: x, 2x, 3x, 4x, 5x, 6x... I'm trying to do this: ...
Red Banana's user avatar
  • 5,613
-2 votes
1 answer
698 views

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 ...
laudiacay's user avatar
  • 572
5 votes
1 answer
277 views

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 ...
user1747134's user avatar
2 votes
1 answer
353 views

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 ...
TumbiSapichu's user avatar
  • 1,673
1 vote
0 answers
510 views

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 ...
Cham's user avatar
  • 4,203

15 30 50 per page