MATLAB: How to multiply two different sized objects

differentmultiplysize;

%Matrix dimensions must agree.
A = 1;
pas = 1/1000;
t=-10:pas:10;
k=10;
omega = -k*pi/A:1/10:k*pi/A;
x=omega.*t;
%The error appears on the last line where x is. how can i multiply them?

Best Answer

omega = linspace(-k*pi/A,k*pi/A,numel(t)); % change your line to this