I am trying to imput tanh^4(0.5x) e^−sin2(x) into matlab but I am not sure how.

조회 수: 2 (최근 30일)
LILIA VERGARA
LILIA VERGARA 2022년 4월 21일
편집: Voss 2022년 4월 21일
I need to use difference formula to estimate the derivative of the function f(x) = tanh^4(0.5x) e^−sin2(x).
-

답변 (2개)

Torsten
Torsten 2022년 4월 21일
편집: Torsten 2022년 4월 21일
syms x
f = (tanh(0.5*x))^4*exp(sin(2*x));
df = diff(f,x)
What is the difference formula ?

Voss
Voss 2022년 4월 21일
편집: Voss 2022년 4월 21일
Here's how to make a function handle out of f(x), assuming sin2(x) is (sin(x))^2, which you could use for whatever:
f = @(x)tanh(0.5*x).^4.*exp(-sin(x).^2)
f = function_handle with value:
@(x)tanh(0.5*x).^4.*exp(-sin(x).^2)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by