그런 Maxima 코드가 있습니다
kill(all);load("interpol")$
q1:[[0,0.1], [0.25,0.2], [0.5,0.3], [0.75,0.4]];
f1(x):=''(cspline(q1));
qt1(x):=''(diff(f1(x),x,1));
나는 얻어진 함수의 값 찾으려 qt1(x)
를 들어 x=1
. 그런 다음 글을 쓰고 qt1(0.3);
마사지를받습니다.
diff: variable must not be a number; found: 0.3
#0: qt1(x=0.3) (interpol.mac line 106)
-- an error. To debug this try: debugmode(true);
어떻게해야합니까?
Maxima는 차별화하는 방법을 모릅니다 charfun2
. 가르 칠 수 있습니다.
load("interpol") $
q: [[0,0.1], [0.25,0.2], [0.5,-0.3], [0.75,1.4]] $
gradef(charfun2(x, A, B), 0) $
e: cspline(q) $
de: diff(e, 'x) $
define( f('x), e) $
define(df('x), de) $
draw2d(explicit(f('x), 'x, 0, 1), 'color='red, explicit(df('x), 'x, 0, 1)) $
나는 'q'에서 포인트를 바꿨다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다