<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Buk<br>
<br>
>your 3 point median filter (perhaps extending it to 5 or 7)
and Claus' Barlett3p() <br>
<br>
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.<br>
<br>
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.<br>
<br>
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 ...<br>
<br>
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.<br>
<br>
/Claus<br>
<br>
On 05-04-2016 17:13, <a class="moz-txt-link-abbreviated" href="mailto:scilab.20.browseruk@xoxy.net">scilab.20.browseruk@xoxy.net</a> wrote:<br>
</div>
<blockquote
cite="mid:D21C236729A.00000133scilab.20.browseruk@xoxy.net"
type="cite">
<pre wrap="">Rafael,
</pre>
<blockquote type="cite">
<pre wrap="">
Fyi, that code does not produce errors in my Scilab 5.5.2 64-bit running
on Win
7
</pre>
</blockquote>
<pre wrap="">
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.)
</pre>
<blockquote type="cite">
<pre wrap="">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
</pre>
</blockquote>
<pre wrap="">
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 <a class="moz-txt-link-freetext" href="http://www.inbox.com/earth">http://www.inbox.com/earth</a>
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>