How to create a function as sum of some sine functions?
Ältere Kommentare anzeigen
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 Kommentar
SHIVAM KUMAR
am 6 Jan. 2021
Is your theta in radians or degrees ?
Akzeptierte Antwort
Weitere Antworten (1)
SHIVAM KUMAR
am 6 Jan. 2021
Bearbeitet: SHIVAM KUMAR
am 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 Kommentar
Klaudjo Aliaj
am 8 Jan. 2021
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!