I'm trying to write simple function in Matlab to calculate and plot Noise Power Spectrum (NPS). First off I wanted to test if the algorithm I got from my teacher was fine and all. Here it is (it was made in mathcad)I'm trying to write simple function in Matlab t