Undefined function 'times' for input arguments of type 'struct'.

4 次查看(过去 30 天)
i keep getting the above error when i try to module a signal using Amplitude modulation.
im very new to this software so maybe its something really minor, but i cant seem to find the solution anywhere.
x=m.*c;
im getting the error in the above line where m is the message wave and c is the carrier wave.
by the way these where passed from another function to this modulating function.
hope someone can help Thanks in advance

回答(1 个)

Wayne King
Wayne King 2013-12-28
编辑:Wayne King 2013-12-28
I think you need to show us how you are forming your variables m and c - is either one or both a structure array?
They clearly aren't vectors.
For example, the following works to form an amplitude-modulated signal:
Fs = 20000;
t = 0:1/Fs:1;
m = (1+cos(2*pi*10*t));
c = sin(2*pi*1000*t);
x = m.*c;

类别

Help CenterFile Exchange 中查找有关 Modulation 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by