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);

 채택된 답변

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

댓글 수: 2

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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

질문:

2016년 4월 25일

댓글:

2016년 4월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by