[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Plots points smoothing
From: |
Matthias Brennwald |
Subject: |
Re: Plots points smoothing |
Date: |
Fri, 6 Jun 2008 08:36:15 +0200 |
A simple solution is to try a running mean over N points (N must be
an even number in this example):
N = 10;
f = repmat (1/N,1,N);
a2 = conv (a,f); a2 = a2(N/2:end-N/2);
plot(a,'b'); hold on
plot(a2,'r'); hold off
Matthias
On 06.06.2008, at 00:44, address@hidden wrote:
Hi all,
I want to customize a graph with two options. The first one is to
smooth lines that union the diferent time points.
The second, if it is posible is to envelope, and connect the
maximum points with the minimum smothing this union.
If you run this file you will see "peaks" I want to elimite them
and make more homogeneus graphic.
function R1
a=[100 247.6020083 286.3675761 272.3062174 80.26950483 139.8426301
78.34706759100 239.0873028 123.4637728 140.7330533 120.625691
-10.4388691 23.13858934100 33.43627631 4.81526546 112.0913254
47.42491211 229.1219878 144.4392328100 14.48044685 48.06236485
149.4893629 70.95881807 143.6070638 126.1001037100 192.8579963
41.88150753 117.6747567 130.9839551 104.7505698 173.850395100
63.98035103 71.86857643 220.4943286 102.7295789 136.8557571
149.045101100 222.5996084 56.4790972 134.3171959 236.5824703
62.41059324 8.088869066100 23.06745092 41.26546571 79.37406245
275.9073594 272.5928681 84.63212985100 76.9210449 279.2402298
108.1317323 56.18829819 144.9506979 66.32051613100 -113.6787362
118.8788474 40.85110524 43.61666578 74.49854451 234.9635424100
75.83113309 5.37011882 113.554889 133.3502406 63.76897457
-76.46719427100 158.8205968 221.6742911 -7.952528826 264.7801533
205.9813716 171.3093441100 -104.513704 124.6029514 25.12435003
-62.06899129 62.22258095 39.10232772100 79.34780168!
291.6122404 192.8458895 200.5386263 105.4680114 -2.853494564100
97.7905608 58.03397026 -10.99872902 106.0123175 55.37186651
-35.38964088100 158.791745 167.2811586 115.5301998 46.18000075
-35.83984053 44.29784635100 -49.76741488 -38.13763622 42.6206969
170.1760672 172.5956422 198.2358879100 49.37659496 33.15366038
-44.28011181 49.47050005 137.0366161 59.20602828100 -97.30115079
41.86501017 137.6105498 110.1227608 108.4026112 243.6586799100
-39.35000333 166.3355026 123.8335488 231.4431456 -24.05193574
76.75505041100 -19.05642395 141.7483176 24.58494504 54.0625926
93.27244676 225.7758027100 36.11136484 -49.61304664 82.02096518
90.76583852 -129.6667387 -7.992638563100 83.00767778 -45.72753514
102.2809656 140.6478623 214.7422103 176.5430224100 55.49177935
181.4050029 42.49151968 199.1295464 19.25956558 94.3691482];
plot(a')