How do I correctly write the following function ?

4 visualizaciones (últimos 30 días)
Iurie Obodeanov
Iurie Obodeanov el 7 de Oct. de 2020
Respondida: VBBV el 22 de Feb. de 2025
I got to this, but I get an error :
f=2.*x.*sin(6.*pi.*x+exp(2.*x.*cos(6.*pi.*x.)));

Respuestas (2)

Ameer Hamza
Ameer Hamza el 7 de Oct. de 2020
Editada: Ameer Hamza el 7 de Oct. de 2020
f=2.*x.*sin(6.*pi.*x+exp(2.*x.*cos(6.*pi.*x.)));
%^ remove this dot
Correct is
f=2.*x.*sin(6.*pi.*x+exp(2.*x.*cos(6.*pi.*x)));

VBBV
VBBV el 22 de Feb. de 2025
@Iurie Obodeanov, Close the parenthesis for first term i.e. sin term , and remove the dot at the end of 2nd term as below
syms x
%vv close vv remove dot
f(x)=2.*x.*sin(6.*pi.*x)+exp(2.*x.*cos(6.*pi.*x))
f(x) = 

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by