0
$\begingroup$

I've been attempting to plot the following function using MATLAB: $$ x(k)=\sum_{n=11}^{50} \sqrt{n} \sin (2n\pi k) +\sum_{n=1}^{40}\sqrt[3]{n} \sin (3n\pi k) $$

Note that $k$ is a continuous variable.

The problem I am facing with MATLAB is when I plot it, I get a signal which has a fundamental period of 2 seconds, and not 1.5 seconds.

Have a look below: Plot using MATLAB plot function

I've tried a higher sampling rate: At a higher sampling rate

So, what is going on wrong? Why isn't the fundamental period 1.5Hz?

$\endgroup$
3
  • $\begingroup$ Assuming your horizontal axis is in seconds, you have 3 full cycles in 2 seconds, which gives a fundamental period of 3/2 Hz = 1.5 Hz, as you were expecting. $\endgroup$ Commented Mar 12, 2016 at 23:34
  • $\begingroup$ @MattL. Thanks, Matt, but $x(k)$ is defined as a continuous periodic function. You could replace k by t. $\endgroup$ Commented Mar 13, 2016 at 6:37
  • $\begingroup$ @ Jazzmaniac Thanks for pointing that out, but... how do you identify the three cycles visually? I can't see them, or see a form of $x(n+N)$ which implies periodicity. $\endgroup$ Commented Mar 13, 2016 at 6:38

1 Answer 1

0
$\begingroup$

With $k$ a continuous variable, the frequencies of the sinusoids in the first sum are $f_n=n$, i.e. they are integers. The frequencies in the second sum are integer multiples of $\frac32$. The highest fundamental frequency of which all those frequencies are integer multiples is $f_0=\frac12$. The frequencies in the first sum are given by $2mf_0$ (with integer $m$), and the frequencies in the second sum are $3mf_0$. With a fundamental frequency of $f_0=\frac12$, the fundamental period is $T=2$, as observed by you.

$\endgroup$
4
  • $\begingroup$ Thanks a lot, Matt! That solved it. But could you explain how did you analytically calculate it? $\endgroup$ Commented Mar 13, 2016 at 12:38
  • $\begingroup$ @Zushauque: Well, the frequencies in your signal are given, and you just need to find a fundamental frequency such that all frequencies in the signal can be represented as integer multiples of that fundamental frequency. $\endgroup$ Commented Mar 13, 2016 at 18:27
  • $\begingroup$ Oh, did that. Thanks for telling me about that. By the way, is there is a systematic way in which I would calculate the fundamental frequency from the arguments of a series of the terms? I saw something about Greatest Common Divisor and Least Common Multiple, 1/2 is the LCM for this example, but it isn't really an integer which is kinda odd for the LCM? $\endgroup$ Commented Mar 15, 2016 at 19:25
  • $\begingroup$ @Zushauque: It's more like a GCD. Have a look at this site. $\endgroup$ Commented Mar 15, 2016 at 19:43

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.