How can I multiply two different sized objects?
Ältere Kommentare anzeigen
%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?
Akzeptierte Antwort
Weitere Antworten (1)
Totanly
am 8 Jan. 2019
0 Stimmen
you can't multiply two different sized vectors. Follow the matrix multiplication rules.
if A=first matrix and B=second matrix
size(A) should be Size(B) for element by element multiplication;
no of columns of A= no of rows of B for matrix multiplication
1 Kommentar
Florea George
am 8 Jan. 2019
Kategorien
Mehr zu Numerical Integration and Differential Equations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!