How to create a function as sum of some sine functions?
Afficher commentaires plus anciens
I am trying to create a function which looks like:
but I am not finding the way how do it it. Can someone help me?
1 commentaire
SHIVAM KUMAR
le 6 Jan 2021
Is your theta in radians or degrees ?
Réponse acceptée
Plus de réponses (1)
SHIVAM KUMAR
le 6 Jan 2021
Modifié(e) : SHIVAM KUMAR
le 6 Jan 2021
This can be done like
y=0; %necessary to add the other things
for i=1:length(a)
y=y+a(i).*sind(2*pi*f(i).*t+theta(i));
end
If this works accept this answer but
if this does not work tell the error/other requirements in comment
1 commentaire
Klaudjo Aliaj
le 8 Jan 2021
Catégories
En savoir plus sur MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!