[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
re-sampling data/signal tia sal22
From: |
Rick T |
Subject: |
re-sampling data/signal tia sal22 |
Date: |
Mon, 7 Mar 2011 03:13:06 -1000 |
re-sampling data tia sal22
Greetings All
I have a signal that has a sample rate of 10 and
would like to change it to 44100, so it can be exported
as audio. The problem is when I plot it the ends of the
signal are very different. Should I be using a different command?
here's the example code:
clear all, clc
fs=10
fsnew=44100;
t= linspace(0,2*pi,fs); %from 0 to 1 with 100 equal spaces between
freq=1; %starting frequency for sinwave
y=sin(freq*(t));
y2 = interp(y,fsnew/fs); %increase sample rate
subplot(2,1,1), plot(t,y)
subplot(2,1,2), plot(y2)
PS: I won't just be using a simple sine wave equation so I can't just change
the sampling rate to 44100, it has to be changed from a lower value to 44100.
tia sal22
--
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- re-sampling data/signal tia sal22,
Rick T <=