[Scilab-users] Wrong number of arguments? exclusive)

Claus Futtrup cfuttrup at gmail.com
Tue Apr 5 19:25:01 CEST 2016


Hi Buk

 >your 3 point median filter (perhaps extending it to 5 or 7) and Claus' 
Barlett3p()

Well, if the median filter doesn't solve the problem ... then for sure 
the Bartlett window will also not solve the problem - it was meant to be 
the least intrusive (most true to the original data) smoothing you could 
possibly do.

I had major success with a Bartlett window, where I had a frequency 
response, did an inverse-discrete Fourier Transform (IDFT) ... and I 
used only 128 points (to reduce calculation time) so that time response 
had some zig-zag patterns - the Barlett window made a fantastic smooth 
result. Each smoothing window has its strengths and weaknesses.

You can convert the code for Barlett3p to a Median3p, simply by 
replacing the weights (0.25 0.50 0.25) with equal weights ... i.e. 0.333 
0.334 0.333 ...

Someone suggested to compare the raw data with the smoothed data - and 
determine persistent issues. Maybe delete the tricky data that doesn't 
ensure convex space ... I think that's your best option because the 
remaining data is true to your original data. If deleting a data point 
is of concern - the alternative is to replace the bad data point with a 
data point interpolated between the surrounding data.

/Claus

On 05-04-2016 17:13, scilab.20.browseruk at xoxy.net wrote:
> Rafael,
>
>> Fyi, that code does not produce errors in my Scilab 5.5.2 64-bit running
>> on Win
>> 7
> Long story short, after blowing away the entire SciLab installation and starting again from scratch, I've now got a working loess() function.
>
> (My guess is that while trying to work out how to install CWA yesterday, I also installed its obsolete predecessor and they conflicted.)
>
>> Testing CWA toolbox's Loess code on your data seems to produce far superior
>> results than the very simple 3-point median filter - see attached
> Looking at your demo (thanks for that) I was initially quite impressed.
>
> However, I wasn't so keen on the fact that with the 0.3 spread you were using, the function was affecting many more points than those I need to deal with. (My engineer's mandate that you stick as close to the real data as possible kicking in there :)
>
> So I started reducing the alpha parameter (#3) to see how close I could get to eliminating the inflections whilst leaving the rest as close to possible unaffected.
>
> I thought that I had found a good range of potential candidates (0.03 - 0.05, 2) when I happened to zoom on a particular region of the curve in the attachment.
>
> If you look closely -- and its not easy to see what is going on -- that particular set of wiggles in the raw data is causing the loess() function (with those particular sets of parameters) to produce loops. The cure is worse than the disease!
>
> Sure I can fix that by broadening the alpha parameter, but then I'm affecting pretty much every value in the dataset rather than just localised to where I need it.
>
> So now I'm back to tweaking your 3 point median filter (perhaps extending it to 5 or 7) and Claus' Barlett3p() to see which of them gets me closer to what I am after.
>
> And, from a couple of the seemingly random replies I received yesterday, it looks like I am taking up too much bandwidth here, so I'm going to back off and see how far what I've learnt will take me.
>
>
> Many thanks for the time and patience of all those who've been helping me.
>
> Buk.
>
> ____________________________________________________________
> FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
> Check it out at http://www.inbox.com/earth
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160405/820106c6/attachment.htm>


More information about the users mailing list