how to differentiate this equation
조회 수: 1 (최근 30일)
이전 댓글 표시
if I have this equation

theta=-2*alpha*sin(kn*pi/n)*sin(2*kn*pi*s/L+2*kn*pi*(i)/n+kn*pi/n)
how can I differenat theta(s) to theta_D and theta_DD
댓글 수: 0
답변 (1개)
KALYAN ACHARJYA
2020년 3월 2일
편집: KALYAN ACHARJYA
2020년 3월 2일
syms s
theta_D=diff(theta,s);
theta_2D=diff(theta,s,2); %or theta_2D=diff(theta_D,s);
댓글 수: 2
Walter Roberson
2020년 3월 2일
diff() can only be used to differentiate symbolic expressions or symbolic functions. If you attempt to differentiate a numeric array but pass in a symbolic variable as the second parameter, or pass in anything that is not a scalar integer (such as a vector of numeric values), then you would get that error.
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!