Re: How to downsample a vector?



Yoav Mor wrote:
I was using downsample() and individual events in the data that are
important to me are lost (of course).

Which filter should I use? which one does matlab use when it plots?

Matlab just plots all the data that you sent to 'plot'. So if your screen is 1000 pixels wide and you have a 30000 numbers vector, then 30 successive numbers from you vector will be plotted onto the same column of pixels on your screen. Nothing is left out, no filtering is performed.


If you downsample your data, you'll probably loose information. In order to be sure, you should do a spectral analysis on your data. Then you can make an estimate how much you can downsample your data. If there are very sharp peaks in your data, then downsampling cannot be done without loosing information. No matter what downsample algorithm or filtering you choose...

The question remains though why you don't want to plot all data.

   Jeroen


Thank you.

Yoav.

daniel ennis wrote:


How are you "downscaling" the vector? Are you sub-sampling dicretely or are you filtering? There are a few ways to downsample.

Yoav Mor wrote:


Hi,

There's something I just don't get:

I need to plot a vector with 30,000-100,000 numbers.
The screen has around 1000 pixels in width.

When I downscale my vector to 1000, 2000 or even 4000, it still
doesn't look as good as it looked when I plotted the entire

vector.

What does matlab do? Does matlab use some downscaling

interpolation

method? And for the most important question: How can I

downscale

my

plot so it'll have as little data as possible but will still

look

good?

Thank you!

Yoav.
.



Relevant Pages

  • Re: Help for sampling rate converter
    ... I want to convert the sampling rate from 11025 Hz to 24000. ... I know that I have to upsample the signal, lowpass filter and downsample ... filtering and downsampling procedure. ...
    (comp.dsp)
  • Re: stroke smoothing question
    ... I've tried some variations of subdivision of points in the interval, and filtering of the last 'm' points upon each new point appended. ... Note that it's not a question of too few points in the polyline causing the appearance of linearity; If I filter the stroke *after* its finished, it appears visibly smooth (but of course deviates from the intended stroke shape). ... I'm not converting the points to pixels, I need them in vector coordinates. ... Try PaintigPen and PauntingTool, availible at http://www.smartfills.com. ...
    (comp.graphics.algorithms)
  • Re: lightness metric for images
    ... Subtract a constant so the left part of the histogram is at zero. ... Anomalies such as dead and hot pixels are excluded from consideration ... process, dead and hot pixels can be removed by median filtering, but not ...
    (sci.image.processing)
  • Touch screen jitters by one pixel
    ... If I hold the stylus on the touch screen, I can see a jitter of only ... My touch screen driver does already filtering. ... a certain amount of pixels using registry keys under CE6? ...
    (microsoft.public.windowsce.platbuilder)
  • Re: upfirdn help. What part of output is signal?
    ... USrate = 8; ... % Filtering and Downsample ... % Recieved IQ data from USRP ...
    (comp.soft-sys.matlab)