필터 지우기
필터 지우기

How do i get rid of error in line 1 after running script

조회 수: 1 (최근 30일)
James Water Bird
James Water Bird 2022년 7월 1일
댓글: Walter Roberson 2022년 7월 1일
%this is the code
syms x;
y1=2*x^3-x+8;
y2=15*x^2-17*x-4;
disp('At the Intersection both the curve point will be same');
At the Intersection both the curve point will be same
disp('Therefore equating both the curves : 2*x^3-x+8 = 15*x^2-17*x-4 ');
Therefore equating both the curves : 2*x^3-x+8 = 15*x^2-17*x-4
disp('Equation becomes : 2*x^3-15*x^2+16*x+12 = 0');
Equation becomes : 2*x^3-15*x^2+16*x+12 = 0
p=[2 -15 16 12];
r=roots(p);
x=r;
y=[0 0 0];
y22=[0 0 0];
for i=1:3
x1=x(i);
y(i) = 2*x(i)^3-x(i)+8;
i=i+1;
end
disp('The intersection points are : ');
The intersection points are :
for j=1:3
fprintf('(%.2f,%.2f) ',x(j),y(j));
end
(6.00,434.00) (2.00,22.00) (-0.50,8.25)
%its supposed to output
  댓글 수: 4
Walter Roberson
Walter Roberson 2022년 7월 1일
perhaps you do not have the Symbolic Toolbox installed or licensed

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by