How to create a function as sum of some sine functions?
Show older comments
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 Comment
SHIVAM KUMAR
on 6 Jan 2021
Is your theta in radians or degrees ?
Accepted Answer
More Answers (1)
SHIVAM KUMAR
on 6 Jan 2021
Edited: SHIVAM KUMAR
on 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 Comment
Klaudjo Aliaj
on 8 Jan 2021
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!