필터 지우기
필터 지우기

create a function that is the derivate of a f=@(t) function

조회 수: 1 (최근 30일)
DDD
DDD 2015년 3월 14일
답변: Giorgos Papakonstantinou 2015년 3월 14일
having a function
fa=@(x) x^5-0.4475*x.^4-3.1*x.^3 + 3.085*x.^2-0:962*x+ 0:0943
how to calculate
dfa=@(x) diff(fa)
so that it is still a function and i can calculate,for example:
dfa(5)

채택된 답변

Giorgos Papakonstantinou
Giorgos Papakonstantinou 2015년 3월 14일
Maybe this:
fa = @(x)x^5-0.4475*x.^4-3.1*x.^3+3.085*x.^2-0.962*x+0.0943
g = sym(fa);
dg = diff(g);
df = matlabFunction(dg)
df =
@(x)x.*6.17-x.^2.*9.3-x.^3.*1.79+x.^4.*5.0-9.62e-1

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by