필터 지우기
필터 지우기

How to reolve this error? Matrix dimensions should agree..!

조회 수: 2 (최근 30일)
Shivam Gupta
Shivam Gupta 2016년 10월 28일
편집: James Tursa 2016년 10월 28일
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);

답변 (1개)

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

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by