2012-11-29 49 views
-2

我有一個69點X = {x1,x2,... x69}的列表。我如何插入點,並創建一個新的列表X1從曲線的插值,但2059點? 我可以插入點,而不是爲獲得的函數做一個表?用mathematica插值

+0

請閱讀'Interpolation'的文檔中。 –

回答

1

一個辦法:

to = 10; 
oldData = {#, RandomReal[]} & /@ Range[to]; 
f = Interpolation[oldData, InterpolationOrder -> 3]; 
newData = {#, f[#]} & /@ FindDivisions[{1, to}, 40]; 

ListPlot[{newData, oldData}, 
PlotStyle -> {{Directive[PointSize[Medium]], Red}, Blue}, 
Joined -> True, Mesh -> All, AxesOrigin -> {0, 0}, 
PlotLegends -> {"new data", "old data"}] 

enter image description here

(新PlotLegend選項PS使用V9)