How do you express this function in MATLAB syntax ?

3 visualizaciones (últimos 30 días)
Emre Can Usengul
Emre Can Usengul el 9 de Jun. de 2020
Comentada: Walter Roberson el 9 de Jun. de 2020
𝑓(𝑥) = e^x + sin(5x)
How do you express this function in MATLAB syntax ?

Respuesta aceptada

KSSV
KSSV el 9 de Jun. de 2020
Editada: KSSV el 9 de Jun. de 2020
f = exp(x)+sin(5*x) ; % define x before
f = @(x) exp(x)+sin(5*x) ; % call by f(value) This is called Anonymous function
  5 comentarios
KSSV
KSSV el 9 de Jun. de 2020
I gave comments...did you folllow those comments?
Walter Roberson
Walter Roberson el 9 de Jun. de 2020
f = exp(x)+sin(5*x) ;
would be an error if you had not defined x before.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Annotations en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by