How can I use symsum to write a sum of functions?
1 view (last 30 days)
Show older comments
I want to set x = .1*sin(2*pi*.1*t) + .2*sin(2*pi*.2*t) + ... + .9*sin(2*pi*.9*t) using summation notation (for example if I want increments of .01 instead of .1 this would be helpful). I've tried:
y = symsum((k/10)*sin(2*pi*(.2 + (k/100))*t), k, 1, 9);
where t is a time vector. Then I try an FFT this data but I get:
Undefined function 'fft' for input arguments of type 'sym'.
Error in SampleFFT (line 16) Y = fft(y,NFFT)/L;
But the y should not be symbolic input, because t varies for all values in the vector and k varies from 1 to 9, so why doesn't it come out to numeric values? Please help me figure out how to get a sum of a series of functions.
0 Comments
Answers (0)
See Also
Categories
Find more on Calculus 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!