3 views (last 30 days)

Walter Roberson
on 10 Nov 2020

syms Data

assume(n, 'integer');

aSym(n) = subs( simplify(int(Data*cos(n.*wo.*t),t,0,To)/(To/2)), Data, data);

bSym(n) = subs( simplify(int(data*sin(n.*wo.*t),t,0,To)/(To/2)), Data, data);

n = 1:nMax;

an = double( aSym(n) );

bn = double( bSym(n) );

However, you will find that with that particular To that all of your a entries and all of your b entries are exactly 0.

Stephen Cobeldick
on 16 Nov 2020

"The code should be private"

By submitting your question on this forum you consented to the terms and conditions given here

which clearly state that you release your code under the Creative Commons Attribution Share Alike 3.0 license. So you have already given everyone on the entire planet permission to copy, distribute, and reuse your code (with appropriate attribution, of course, following the requirements of that license).

"I can not understand why u share all of my code again sir."

Because this answer does not make sense without it.

Because all of the volunteers on public internet forums volunteer their time on the understanding that their time helping one person might also be of interest and use to other people. This is the nature of such public forums.

By deleting the content of your question you treat those volunteers as your own unpaid private consultants. You unilaterally decide to reject one of the reasons for taking part in a public forum, which is that it is public.

If you want private help then you can find plenty of private consultants who will be happy to sign an NDA.

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

Start Hunting!
## 7 Comments

## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/643240-audio-signal-eval-error-for-fourier-series-approximation#comment_1123700

⋮## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/643240-audio-signal-eval-error-for-fourier-series-approximation#comment_1123700

## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/643240-audio-signal-eval-error-for-fourier-series-approximation#comment_1123745

⋮## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/643240-audio-signal-eval-error-for-fourier-series-approximation#comment_1123745

## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/643240-audio-signal-eval-error-for-fourier-series-approximation#comment_1123820

⋮## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/643240-audio-signal-eval-error-for-fourier-series-approximation#comment_1123820

## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/643240-audio-signal-eval-error-for-fourier-series-approximation#comment_1123825

⋮## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/643240-audio-signal-eval-error-for-fourier-series-approximation#comment_1123825

## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/643240-audio-signal-eval-error-for-fourier-series-approximation#comment_1123845

⋮## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/643240-audio-signal-eval-error-for-fourier-series-approximation#comment_1123845

## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/643240-audio-signal-eval-error-for-fourier-series-approximation#comment_1123905

⋮## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/643240-audio-signal-eval-error-for-fourier-series-approximation#comment_1123905

## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/643240-audio-signal-eval-error-for-fourier-series-approximation#comment_1136578

⋮## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/643240-audio-signal-eval-error-for-fourier-series-approximation#comment_1136578

Sign in to comment.