Error in fsolve function

조회 수: 1 (최근 30일)
yogeshwari patel
yogeshwari patel 2022년 3월 30일
편집: yogeshwari patel 2022년 4월 1일
syms x a
series(x)=sym(zeros(1));
Y=sym(zeros(1));
m=sym(1);
Y(1)=0;
Y(2)=a;
%N=input ('enter the number of coefficient required')
for k=1:6
Y(k+2)=((18*kroneckerDelta(k,m)-9*Y(k)))/(k*(k+1));
end
disp(Y)
for k=1:6
series(x)=series(x)+Y(k)*(power(x,k-1));
end
series
M=series(pi/2)-1
a=fsolve(M,0)
The last line is showing error and further i just want to evaluate the series by putting value of a by using command .But again getting error
  댓글 수: 1
Catalytic
Catalytic 2022년 3월 30일
We are not sitting next to you at your computer. We cannot see the error messages that you are getting.

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

채택된 답변

Matt J
Matt J 2022년 3월 30일
  댓글 수: 2
yogeshwari patel
yogeshwari patel 2022년 3월 30일
Now how to substutite the value of a gain in series to obatin the solution in terms of x
yogeshwari patel
yogeshwari patel 2022년 3월 30일
편집: yogeshwari patel 2022년 4월 1일
Thanks
now i use the command to substitute the value in the series but i not displaying correct answer
series
syms x a
series(x)=sym(zeros(1));
Y=sym(zeros(1));
m=sym(1);
Y(1)=0;
Y(2)=a;
%N=input ('enter the number of coefficient required')
for k=1:6
Y(k+2)=((18*kroneckerDelta(k,m)-9*Y(k)))/(k*(k+1));
end
disp(Y)
for k=1:6
series(x)=series(x)+Y(k)*(power(x,k-1));
end
series
M=series(pi/2)-1
a=solve(M)
series

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by