配列の長さが違う2つの配列を揃える方法
Show older comments
配列の長さが違う2つの配列を、同じ長さに合わせるためには、どのような方法があるでしょうか?
(例)
A = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] ;
B = [10,NaN,NaN,NaN,1,NaN,5,NaN,NaN,-1];
配列Bのデータは不等間隔でサイズも配列Aと異なります。
この配列Bを20等分し長さを揃えた
C = [10,9,8,7,6,5,4,3,2,1,2,3,4,5,4,3,2,1,0,-1] ;
が必要です。
*実際の配列は数万行あります。
この配列Cは線形で補完できるものです。
よろしくお願いします。
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!