Problem about plotting 2D about multiple of functions
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi.
I started Matlab recently. I wanted to draw this graph but Matlab always say this error.
x = 0:pi/100:6*pi;
y = floor(sin(x)) * floor(x);
plot(x,y);
Error using *
Inner matrix dimensions must agree.
Is it possible to help me? I'm sorry for bad English too.
Thanks.
댓글 수: 0
채택된 답변
Mischa Kim
2016년 12월 6일
편집: Mischa Kim
2016년 12월 6일
Amin, use instead
y = floor(sin(x)) .* floor(x); % notice the period before the *
This allows you to do element-wise multiplication.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
