How do I correctly write the following function ?

2 vues (au cours des 30 derniers jours)
Iurie Obodeanov
Iurie Obodeanov le 7 Oct 2020
Réponse apportée : VBBV le 22 Fév 2025
I got to this, but I get an error :
f=2.*x.*sin(6.*pi.*x+exp(2.*x.*cos(6.*pi.*x.)));

Réponses (2)

Ameer Hamza
Ameer Hamza le 7 Oct 2020
Modifié(e) : Ameer Hamza le 7 Oct 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 le 22 Fév 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) = 

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by