How to reolve this error? Matrix dimensions should agree..!
조회 수: 2 (최근 30일)
이전 댓글 표시
theta=0:0.01:2*pi;
r1=3/cos(theta);//getting error here "Error using / Matrix dimensions must agree"
r2=-4/sin(theta);//getting error here "Error using / Matrix dimensions must agree"
polarplot(theta,r1);hold on;
polarplot(theta,r2);
댓글 수: 0
답변 (1개)
James Tursa
2016년 10월 28일
편집: James Tursa
2016년 10월 28일
Use element-wise operator ./ instead of the matrix operator /
r1=3./cos(theta);
r2=-4./sin(theta);
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!