help-octave
[Top][All Lists]
Advanced

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

Re: Simulating data smoothing on a 2D matrix. New to Octave/Matlab platf


From: Martin Helm
Subject: Re: Simulating data smoothing on a 2D matrix. New to Octave/Matlab platforms
Date: Wed, 1 Jul 2009 13:22:05 +0200
User-agent: KMail/1.10.3 (Linux/2.6.27.23-0.1-default; KDE/4.1.3; x86_64; ; )

Am Mittwoch, 1. Juli 2009 12:35:21 schrieb Søren Hauberg:
> ons, 01 07 2009 kl. 10:48 +0100, skrev Nuno Santos:
> > Søren Hauberg wrote:
> > > tir, 30 06 2009 kl. 17:37 +0100, skrev Nuno Santos:
> > >> First I would like to see the 2D matrix drawn on a 3D graphic, where
> > >> each value of the 2D matrix is a Z value on the 3D graphic.
> > >
> > > Try the 'mesh' or 'surf' functions for such plots. For larger matrices,
> > > you might consider just showing them as an image using 'imshow'. 
This
> > > can be much faster, and it often provides a better overview.
> >
> > To draw using the mesh function I need 3 matrixes. The things is that I
> > only have one matrix and so, I need two other matrixes for X and Y to
> > make the Z have the point in the right place.
> >
> > Isn't there a direct form of doing this? Or isn't there a way of
> > generating the other two matrixes automaticly?
>
> You can omit the 'X' and 'Y' matrices, i.e. just call 'mesh (Z)' (same
> goes for 'surf'). If you actually want the 'X' and 'Y' matrices, you can
> use the 'meshgrid' function.
>
> > >> Then I would like to apply several smoothing function (and if anyone
> > >> could point me some functions), to the data in order to visually see
> > >> the results.
> >
> > I was looking for function to smooth noise variations from direct ADC
> > readings. I have found savgol filters on the internet so I was wondering
> > if octave had some similar filters
>
> From
> http://research.microsoft.com/en-
us/um/people/jckrumm/savgol/savgol.htm
> it sounds like these are just linear filters (I only read the first
> couple of lines), so you can implement them using the 'conv2' function.
> The link also provides some Matlab code that I guess should work
> out-of-the-box in Octave.
>
> I would still recommend looking at the 'imsmooth' function. It provides
> several methods that you can easily use (both linear and nonlinear
> stuff).
>
> Søren
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

There is also a matlab script available for savgol at

http://www.solvingproblems.ethz.ch/downloads.html

I tested that it works with octave. (I don't know how it is licensed it is 
source code which belongs to a book).

- mh





reply via email to

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