MATLAB Answers

Smoothing with weighted data points

2 views (last 30 days)
Avichay Efraim
Avichay Efraim on 23 Feb 2020
I have matrix of observation data: Number of droplet concentration [Nd] for bins of temperatures [T],
and a vector containing the number of data points for each bin.
How do I do weighted smoothing for the Nd data by the number of data points I have for each bins? (Where Nd with less datapoints will affect less on the smoothed curve)
Nd = [30.2397065482437 29.4178227625458 NaN 39.1785751388876 30.3100664056194 NaN NaN NaN NaN NaN NaN NaN 44.3862297601500 42.6029250886986 NaN NaN 62.8404770996572 NaN NaN NaN 51.7690867997445 44.8235140740623 35.1148267628440 65.8390072417316 72.6940743487428 105.129782295289 115.226552888571 172.949437425404 347.678252058926 178.522231112411 195.917712702729 244.113452625535 147.224050163021 181.736468465389 127.931678773155 277.794424048045 211.893266655884 249.490967305866 238.037416199781 226.979771206052 147.143516673861 147.697955364641 121.241647476119 165.666212313657 181.217045893094 248.772476396263 124.069436752440 165.325283862457 137.234705695180 159.575767329897 133.147328944459 118.296052658004 142.576164121865 134.884349711517 138.968929868427 131.477225871365 120.146648600862 134.852881696228 156.034311382487 167.089925394842 180.151524822946 184.658753482804 173.452097398047 156.775995495594 121.728026113768 72.8673620831153 0];
T = [-43 -42 -41 -40 -39 -38 -37 -36 -35 -34 -33 -32 -31 -30 -29 -28 -27 -26 -25 -24 -23 -22 -21 -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23];
num_of_pix = [1 1 0 1 1 0 0 0 0 0 0 0 3 1 0 0 2 0 0 0 2 7 7 5 8 6 4 12 13 14 14 9 11 4 3 7 14 22 13 11 21 17 13 11 9 10 11 10 22 34 32 38 43 66 80 90 132 174 238 253 210 86 88 50 34 19 6]
Thanks,
AE

Answers (0)

Products


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!