<p dir="ltr">Hi Buk</p>
<p dir="ltr">There are very nice features in Scilab to do the selective deletion of data.</p>
<p dir="ltr">For example make an array of boolean and extract good data.</p>
<p dir="ltr">BTW, I think I speak for the majority when I say it's Ok to post lots of mails into the mailing list. Don't worry. Nobody wish for a "dead quiet" mailing list :-)</p>
<p dir="ltr">Best regards,<br>
Claus </p>
<div class="gmail_quote">On Apr 5, 2016 22:38, <<a href="mailto:scilab.20.browseruk@xoxy.net">scilab.20.browseruk@xoxy.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Claus,<br>
><br>
> You can convert the code for Barlett3p to a Median3p, simply by<br>
> replacing the weights (0.25 0.50 0.25) with equal weights ... i.e. 0.333<br>
> 0.334 0.333 ...<br>
<br>
I extrapolated a barlett5p() function from your example:<br>
function [out]=bartlett5p(indata)<br>
out = indata;<br>
if length(indata) > 3 then<br>
out( 3:$-2 ) = 0.2 * indata( 1:$-4 ) + 0.2 * indata( 2:$-3 ) + 0.2 * indata( 3:$-2 ) + 0.2 * indata( 4:$-1 ) + 0.2 * indata( 5:$ );<br>
end<br>
endfunction<br>
<br>
And tried various sets of weights: (0.1, 0.2, 0.4, 0.2, 0.2 etc.) before settling on the "median5p()" set above.<br>
<br>
The result (as shown in the attachment) is that whilst it addresses the cases where the barlett3p() leaves inflections in the dataset (albeit much reduced); it leaves inflections where the barlett3p() doesn't :(<br>
<br>
><br>
> Someone suggested to compare the raw data with the smoothed data - and<br>
> determine persistent issues. Maybe delete the tricky data that doesn't<br>
> ensure convex space ... I think that's your best option because the<br>
> remaining data is true to your original data. If deleting a data point<br>
> is of concern - the alternative is to replace the bad data point with a<br>
> data point interpolated between the surrounding data.<br>
<br>
Yes. I'm rapidly coming to the conclusion that I need to stop looking for a continuous 'mathematical solution' to this problem and return to the prosaic, procedural code that detects negative slopes and simply deletes the points that cause them, that I had when when I first asked the question here.<br>
<br>
Since there doesn't seem to be any nice way of coding that in SciLab, and I'm vastly more comfortable in Perl, I'll code my solution there where I won't be running into anomalies that bring me back here asking dumb question every five minutes.<br>
<br>
Thanks for your time and observations; they've been very helpful.<br>
<br>
Cheers, Buk.<br>
<br>
____________________________________________________________<br>
Can't remember your password? Do you need a strong and secure password?<br>
Use Password manager! It stores your passwords & protects your account.<br>
Check it out at <a href="http://mysecurelogon.com/manager" rel="noreferrer" target="_blank">http://mysecurelogon.com/manager</a><br>
<br>_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.scilab.org/mailman/listinfo/users</a><br>
<br></blockquote></div>