Error using ==> mtimes Inner matrix dimensions must agree.

Can anyone help me how to fix this error?
W=[-1:0.01:1];
y=(4*1i*(W*cos(W) + sin(W)))/(W^2);

 Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 25 Apr. 2016
Use ./ instead of /
y=(4*1i*(W*cos(W) + sin(W)))./(W^2);

2 Kommentare

Also these changes:
y=(4*1i*(W.*cos(W) + sin(W)))./(W.^2);
Thanks!!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by