0

on my question, user Javi_gg1 send me an answer that's right for me. This answer have this code

\draw[ultra thick, red] plot (\x, {sin(deg(exp(ln(\fmin)+\x/\xmax*(ln(\fmax)-ln(\fmin)))*\x))} );

I could not understand how he works. is there anyone (maybe javi_gg1) who can explain it to me? Because I would change some aspect.

RenatoP
  • 791
  • 9
    Can you add a link to the answer you're talking about? But perhaps this is better left as a comment to the answer. – Alan Munn Dec 13 '18 at 18:44
  • 2
    This is a parametric plot with \x denoting the parameter, the x-coordinate being equal to \x and y being sin(deg(exp(ln(\fmin)+\x/\xmax*(ln(\fmax)-ln(\fmin)))*\x)). Without a referral to the post, one cannot tell what the domain and are because they were either set outside the plot or the default values, nor what \fmax and \fmin are. The answer you are referring to sets domain=0:\xmax and samples=500. –  Dec 13 '18 at 18:54
  • 1
    I guess your question is more a math question. exp(ln(\fmin)+\x/\xmax*(ln(\fmax)-ln(\fmin)))*\x can be rewritten as \fmin*((\fmax/\fmin)^(\x/\xmax))*\x, so it multiplies \x by an exponential that equals \fmin at \x=0 and \fmax at \x=\xmax. Why the author of this answer has chosen to write it in this way, is hard to say, but may not necessarily be a question that is suited for this forum. If you really want to know what this function does, plot it (without wrapping it into sin(deg(...*\x)). –  Dec 13 '18 at 19:23
  • 4
    @marmot ooh marmots are very good at mathematics! :) – Paulo Cereda Dec 13 '18 at 20:43
  • the post is: https://tex.stackexchange.com/questions/405048/sin-wave-with-changing-frequency/405058#405058 – RenatoP Dec 14 '18 at 07:35

0 Answers0