help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions regarding signal processing in octave


From: Doug Stewart
Subject: Re: Questions regarding signal processing in octave
Date: Thu, 10 Nov 2016 06:44:30 -0500



On Thu, Nov 10, 2016 at 6:19 AM, Ahmed Husain ?Abbas Mohamed Sahrab <address@hidden> wrote:

We are a group of college students doing a project about signal processing.

We would like to compute the PSD(Power Spectral Density) and the Power Spectrum, our question is how to find the Power Spectrum and how to use different frame sizes e.g. 128, 256, 512.

We used this following code to find the PSD


NFFT=32768;

F=fft(y,NFFT);

F_Shift=fftshift(F);

Px=F_Shift.*conj(F_Shift)/(NFFT*L);   


We tried using a NFFT of 1024 but we literally got two intersecting lines


Our Second question is about sine waves, we have a wave with the following specification


x = A1*sin(2*pi*f1*t)

Sampling Frequency = 100 kHz =Fs

Frequency = 10 kHz = F1

Amplitude = 0.1 = A1


We need to generate 1000 samples of this wave, we were given an equation which is 
(fs=f*N) in which f is the frequency and N is the amount of samples needed. but in the question we already have the fs which is 100kHz so how are we supposed to generate 1000 samples?

Should we use
 t= 0:ts: Tfinal
until we have 1000 values in the t variable?




Best Wishes


Students of Polytechnic Bahrain


_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave

you said that
Sampling Frequency = 100 kHz =Fs

this is 100,000 samples in 1 second.
to get 1000 values you need 1000/100,000 seconds

Tfinal=1000/100000;



--
DASCertificate for 206392


reply via email to

[Prev in Thread] Current Thread [Next in Thread]