0
$\begingroup$

I'm trying to obtain a list of the points of an amplitude-increasing sine function. I would like to give a certain value for input, e.g. 0.5. Sine will start increasing and decreasing from this point, at the same time it will start increasing in amplitude in a given time, reaching to peak of 0 and 1. How can I do that?

I tried with this really rough solution, still improving my Mathematica skills :)

sinIncrease[inValue_] := Module[{y, z, f},
  y = Range[0.001, 1., .001];
  z = Range[0.001, -1., -001];
  f = Riffle[y, z];
  inValue + f`

Thank you, D

$\endgroup$
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – Michael E2 Nov 21 '15 at 0:47
  • $\begingroup$ $A(t) \sin \omega t$, where $A(t)$ is increasing? But "reaching to peak of 0 and 1" makes no sense to me -- can you clarify? $\endgroup$ – Michael E2 Nov 21 '15 at 1:39
  • $\begingroup$ Hi, the movements of the sine should have a maximum of 0 and 1. I think this could be achieved with a Rescale. $\endgroup$ – fragmentsinabox Nov 21 '15 at 9:21
1
$\begingroup$

Here's a sin wave with increasing amplitude:

Plot[t Sin[2 Pi 20 t], {t, 0, 1}]

enter image description here

If you want samples of this:

sam = Table[t Sin[2 Pi 20 t], {t, 0, 1, 0.01}];
$\endgroup$
  • $\begingroup$ Thank you a lot @bill_s, I'll try it :) $\endgroup$ – fragmentsinabox Nov 21 '15 at 9:25
0
$\begingroup$

I am not sure get what you want or not but this is a simple approach:

Table[RandomReal[]*Sin[x], {x, 0, 2 Pi, Pi/12}]
Table[2 RandomReal[] + 3 Sin[x], {x, 0, 2 Pi, Pi/12}]
Table[(-1)^RandomChoice[{0, 1}]*2 RandomReal[] + 3 Sin[x], {x, 0, 
  2 Pi, Pi/12}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.