mastevano
Newbie level 6
Hello!
I'm tryinig to write a simple convolution program in matlab, but i keep getting stuck!
Basically, I'm trying to convolve two signals:
1) x(t)=3sin(50*pi*t) + sin(220*pi*t) sample at 250Hz from 0 to .3 sec
2) g(t)=150*e^(-112t)*sin(112t) sampled at 250Hz from 0 to .1 sec
So, I know that the first signal will consist of 75 sample at 4ms intervals and the second will consist of 25 samples at 4ms intervals. I was able to graph the first fuction in matlab using the stem function.
I'm having a hard time graphing the second equation. I keep getting the following error:
??? Error using ==> *
Inner matrix dimensions must agree.
For equation 1 I defined t as such: 0:.004:.3 and for equation 2 I used a different variable, n, defined as 0:.004:.1.
Any help is greatly appreciated!
I'm tryinig to write a simple convolution program in matlab, but i keep getting stuck!
Basically, I'm trying to convolve two signals:
1) x(t)=3sin(50*pi*t) + sin(220*pi*t) sample at 250Hz from 0 to .3 sec
2) g(t)=150*e^(-112t)*sin(112t) sampled at 250Hz from 0 to .1 sec
So, I know that the first signal will consist of 75 sample at 4ms intervals and the second will consist of 25 samples at 4ms intervals. I was able to graph the first fuction in matlab using the stem function.
I'm having a hard time graphing the second equation. I keep getting the following error:
??? Error using ==> *
Inner matrix dimensions must agree.
For equation 1 I defined t as such: 0:.004:.3 and for equation 2 I used a different variable, n, defined as 0:.004:.1.
Any help is greatly appreciated!