Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to decimate the signal in matlab

Status
Not open for further replies.

prcken

Advanced Member level 1
Advanced Member level 1
Joined
Nov 1, 2006
Messages
419
Helped
41
Reputation
82
Reaction score
38
Trophy points
1,308
Location
Shanghai
Visit site
Activity points
4,059
Hi, I am using Matlab and Delta-Sigma toolbox to simulate the system below
Capture.PNG
I can get the signal after being filtered as shown in the figure below
plot.jpg
the vout in the plot is not the final output. I think the final output should be decimated digital output. does anybody know how to do the decimation in Matlab?
Thanks!
 

I tried vout = vout(1:OSR:end); and vout = resample(vout,1,OSR);
both can do decimation.
but both return a vector length which is the (original vector length) /OSR, such that i couldn't overlay and compare it to the signals before decimation.

and another thing is the decimated output is not digital signal by using this Matlab command. I think it also needs a compactor kind of function

I am not sure if I said my problem clear.
 
Last edited:

Basically, decimation algorithms reduce number of samples. The length of the vector is smaller, but the time vector has greater dt.
I'm not sure what result do You want to get.
While You decimate the signal, You will get the same shape of the curve, with the smaller number of samples.
If you want to decimate signal, and keep the old dt (fs) (compress signal in time domain ), then You should add zeros at the end of the vector.
But I don't think that is a good idea.
 

yes, you are absolutely right.
I've solved the problem by using repmat command in the matlab. and can only represent in decimal format in the time-domain plot, basically like a sample and hold. from the PSD plot, seems correct. please check the picture below

Capture2.PNG
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top