Warning: The method char/diff will be removed

While running this algorithm I am getting the following warning can anyone helpme to solve it?
Warning: The method char/diff will be removed in a future release. Use sym/diffinstead. For example diff(sym('x^2')). After removal diff('x^2') will return diff(double('x^2')).
dR=diff(aaa.R);
d2R=diff(dR);
xi=1;
e=0.0001;
ea=1000;
c=1;
x=xi;
while ea>e
g=eval(aaa.R);
h=eval(dR);
k=eval(d2R);
j=x-(g*h)/(h^(2)-(g*k));
ea=abs((j-x)/j*100);
x=j;
c=c+1;
end
resultado = j;

댓글 수: 1

Jan
Jan 2013년 4월 19일
And in which line does this warning appear? We cannot guess this detail.

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

 채택된 답변

Jan
Jan 2013년 4월 19일

0 개 추천

The warning message suggests to replace diff('YourString') by diff(sym('YourString')). Therefore I assume, that this would be a good strategy. Did you try this already?

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

질문:

2013년 4월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by