Interpolate between arrays depending on a variable
古いコメントを表示
Hi
I want to interpolate between two arrays.
My cell is, scale_x = {...
0 ,0,0.009,0.035,0.04,0.1;...
10 ,0,0.02,0.04,0.15,0.2;...
30 ,0,0.08,0.09,0.12,0.2;...
40 ,0,0.02,0.01,0.06,0.2;...
50 ,0,0.05,0.08,0.1,0.2;...
60 ,0,0.02,0.05,0.06,0.15;...
70 ,0,0.005,0.013,0.05,0.1;...
80 ,0,0.001,0.01,0.02,0.1;...
90 ,0,0.005,0.04,0.08,0.2;...
100 ,0,0.001,0.008,0.01,0.08;...
110 ,0,0.003,0.01,0.04,0.2;...
130,0,0.01,0.01,0.04,0.2;...
};
The first column of the variable denote the vehicle speed. The rest of the columns are data related to theat vehicle speed.
So when i get an input of vehicle speed which is inbetween two vehicle speeds, I want to interpolate between that two rows.
For example, say that my input speed is 48. It is between 40 and 50. So, i get the two rows as two arrays.
Say, x1 = [40 0 0.02 0.01 0.06 0.2] x2 = [50 0 0.05 0.08 0.1 0.2]. Now i have to interpolate both arrays for the value 48. Is my idea to do the interpolation correct? Or is there any way to do it directly without gettin the rows as arryas? I was not able to do it. Help me with this.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Interpolation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!