Tutmos
Newbie level 1
Hello,
I'm in the process of trying to display the PSD of a biological recording to analyze the frequency content of the signal at different time periods. I've been spending the last couple months trying to teach myself basic signal processing and learning to use matlab in addition to a billion other things I have to do. Unfortunately I'm starting to run out of time on getting past this portion of the task and really need to admit that I need help. I am not a math guy so forgive some of my misunderstandings about the parameters or matlab programming mistakes.
I have a voltage signal that varies over time with a recording sample rate of about 40kHz. I'm initially trying to display this as a 2d plot, frequency in Hz on the X and dB on Y, eventually I'll try to incorportate time by moving dB to color intensity. Here's the pwelch related code I've been trying to use so far: S1 is the data.
s1 = XYZMADEUP.d(1:484848);
a1=pwelch(s1,[20000],[],[],44040);
figure, plot (a1); axis([0 250 0 .06])
I get a plot that looks reasonable although the power seems low and if I don't specify a window size, the 20000, and use the default of dividing the sample into 8 windows then my frequency scale shifts when I look at the different periods of time by adjusting which data range is being evaluated. I think I'm in over my head here. I don't know how I can establish if the frequency scale is accurate, which is critical for my project, I don't have a reference signal built into the sample or anything.
Any help would sincerely be appreciated.
I'm in the process of trying to display the PSD of a biological recording to analyze the frequency content of the signal at different time periods. I've been spending the last couple months trying to teach myself basic signal processing and learning to use matlab in addition to a billion other things I have to do. Unfortunately I'm starting to run out of time on getting past this portion of the task and really need to admit that I need help. I am not a math guy so forgive some of my misunderstandings about the parameters or matlab programming mistakes.
I have a voltage signal that varies over time with a recording sample rate of about 40kHz. I'm initially trying to display this as a 2d plot, frequency in Hz on the X and dB on Y, eventually I'll try to incorportate time by moving dB to color intensity. Here's the pwelch related code I've been trying to use so far: S1 is the data.
s1 = XYZMADEUP.d(1:484848);
a1=pwelch(s1,[20000],[],[],44040);
figure, plot (a1); axis([0 250 0 .06])
I get a plot that looks reasonable although the power seems low and if I don't specify a window size, the 20000, and use the default of dividing the sample into 8 windows then my frequency scale shifts when I look at the different periods of time by adjusting which data range is being evaluated. I think I'm in over my head here. I don't know how I can establish if the frequency scale is accurate, which is critical for my project, I don't have a reference signal built into the sample or anything.
Any help would sincerely be appreciated.