Hi guys I fucked up

Hi guys I fucked up

I lied to get in a class with a prerequisite and I don't know shit.

In supposed to make a program like this that makes a square wave out of sin waves. Wtf. I know calculus so my math is pretty up there but idk how to do

Attached: Screenshot_20190111-152820.png (1080x1920, 694K)

Other urls found in this thread:

falstad.com/fourier/
mathworld.wolfram.com/FourierSeriesSquareWave.html
en.wikipedia.org/wiki/Fourier_sine_and_cosine_series
twitter.com/SFWRedditVideos

are you retarded? google it you fucking dumbass

install gentoo

>I know calculus so my math is pretty up there

You sweet summer child

Looks like Fourier transform and Gibbs overshoot. I'm gay btw

Well... you calculate all points for a given range and save them in an array and then you print them on the window? Isn’t that hard, and no matter what language you use, there will be 1000 tutorials on google.

OP this is a Fourier synth and it's pretty high level if you're required to understand the way the definite integrals orthogonalality goes to 0.

You're fucked if all you know is calculus.

go to profs office hours and ask for help, ask classmates, google

The answer is on the Wikipedia page for "square wave".

Good luck man. Completely fucking useless this shit is. Just busy work to get that degree printed. I believe in you.

That's not the awnser though. Post picture is a series of infinite sins and cosines that add up to an infinite approximation of one.

Op is a retard for enrolling in a grad class.

Musician here
I think you just stack sine waves at certain intervals and frequencies to create other waveforms
Look up additive synthesis
I assume you mean like an actual computer program and not a function or something

It gives the exact infinite series.

Not in that picture. He's truncating to n=[finite integer]. Only the infinite sum is a complete representation.

in audio engineering its the harmonic overtone series and for timbre shaping- i think its all even harmonics or all odd, do the google and calculus meme godspeed user

Get fucked cuckputer science faggit

Pretty sure matlab has a fourier function.

Just keep adding Sine waves bruh.

This guy gets it. Its Fourier synthesis.

Here play with this interactive java app and you will get it

falstad.com/fourier/

mathworld.wolfram.com/FourierSeriesSquareWave.html

Is this good enough? I dont think a pure square wave is mathematically possible. But the higher the root we'll take out of the sin x the more square like the wave will be. Note that the root MUST be odd.

Attached: Screenshot_20190112_031720.jpg (1080x1178, 110K)

>pretty high level
Lmao

>Op is a retard for enrolling in a grad class.
What kind of shit college you go in user? I learned this is my undergrad and it's not even hard. There are bunch of different transforms depending upon the kernel and Fourier is one of them.

Brilliant!

u dun goofed OP, let this be a lesson, don't cut corners life will catch up with your bullshit

You just have to calculate the midlines of each wave and average them

sign(sin(x))

:^)

floor(sin(x)+.5)

>it's pretty high level
If there's one thing I know about maths is that the rabbit hole is so deep getting to a "pretty high level" requires taking a career in maths. I'm assuming Fourier synthesis is related to Fourier transforms which I hear about everywhere so it can't be that high level.

Holy shit you should get a Darwin Award because you are about to kill your GPA

It's literally freshman calculus level.

It's almost like you can finitely approximate a converging infinite series.

best answer in thread :^)

Undefined behavior of floor and negatives

[](auto x) constexpr { return sin(x)

oh this class is Digital Signal Processing for Chemistry Majors. This is the first assignment and its the one that determines if we can stay in the class.

i guess we also have to write out the proof.

You done fucked up son.

If you think fourier transforms are hard then you should really neck yourself pronto.
Making these is quite easy in matlab if you are not forced in a language.

>Tries to be smart
>Fourier transform

It's not the FFT function being used here. This is a fourier series, not the transform operation.

He was talking about the program part and plotting it.

en.wikipedia.org/wiki/Fourier_sine_and_cosine_series