matlab - Filling missing data in a data set -



matlab - Filling missing data in a data set -

i have info set following:

x= [1, 4, 10] y= [10, 20, 30]

(x , y value pairs, i.e. (1,10), (4,20), (10,30))

i fill x values gaps , linear interpolated values y. linear interpolation should done between each value pair, i.e. between (1,10) , (4,20) , 1 time again between (4,20) , (10,30).

x= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] y= [10,?, ?, 20, ?, ?, ?, ?, ?, 30]

how can solve matlab? regards, dennis

p.s. original info set has on 300 value pairs...

using interp1

code:

x= [1, 4, 10]; y= [10, 20, 30]; xi = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; yi = interp1(x,y,xi);

results:

>> yi yi = 10 13.333 16.667 20 21.667 23.333 25 26.667 28.333 30

graphical output using plot(xi,yi,'-*')

matlab dataset interpolation

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -