In my signal processing class I have some basic tasks working with sinus signals in Matlab. I have two sinusoidal signals with 1kHz and 3kHz and sampling rate of 16kHz. The next task says 'Create a linear combination of the two signals and save the result in a new vector'.

I don't really understand what's meant by the linear combination. I remember something vague about having to add them with weights but I'm don't quite comprehend what that does or how to do it.


2 Answers 2


As you said, a linear combination of two signals $x_1[n]$ and $x_2[n]$ is simply


with real-valued weights $w_1$ and $w_2$.

  • $\begingroup$ How do I choose the weights? Are they depending on the frequency? $\endgroup$
    – Granolaboy
    Commented Dec 19, 2018 at 22:29
  • 2
    $\begingroup$ @Pulz That question should probably be posed to your instructor. $\endgroup$
    – MBaz
    Commented Dec 19, 2018 at 22:48
  • 2
    $\begingroup$ "Create a linear combination ..." doesn't say anything about the weights, does it? So just choose what you fancy. $\endgroup$
    – Matt L.
    Commented Dec 20, 2018 at 8:12
  • 1
    $\begingroup$ $w_1 = w_2 = 0$ 😂🤣😂 $\endgroup$
    – Peter K.
    Commented Feb 19, 2019 at 2:44
  • 1
    $\begingroup$ If the instructor gives you that freedom, I would definitely use the comment from @PeterK. and set both weights to zero! I'd also include an example with weights like 1 and 0.5 just for extra credit ;-) $\endgroup$
    – Dave C
    Commented Feb 19, 2019 at 23:02

A linear combination simply means addition of the two signals.

And weights are just the amplitudes of your signals. There are no "standard" amplitudes. Even assuming it as one will be wrong


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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