データシート内にある特定列の値から指定した値の近傍値を求めて、該当行にある任意の値を参照したい
Ältere Kommentare anzeigen
X | Y || a | b | c | ... | z | ... |
10 | 10 || a1 | b1 | c1 | ... | z1 | ... |
20 | 10 || a2 | b2 | c2 | ... | z1 | ... |
30 | 10 || a3 | b3 | c3 | ... | z1 | ... |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 | 50 || a* | b* | c* | ... | z* | ... |
20 | 50 || a* | b* | c* | ... | z* | ... |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 | 200 || a* | b* | c* | ... | z* | ... |
20 | 200 || a* | b* | c* | ... | z* | ... |
このように X, Y 列に任意の値があり、指定された X, Y の最近傍値を求めて、
該当する行の a, c, c, ... の値を各変数に代入したいです。
また、該当が複数ある場合は、a, b, c, ... 各値の平均値を使用したいです。
例 X = 24, Y = 12 のとき
a = a2, b = b2, c = c2, ... を代入
1 Kommentar
michio
am 2 Feb. 2019
質問の投稿、ありがとうございました。もし課題や疑問が解決されておりましたら、
ぜひ、該当する回答の「この回答を採用」ボタンのクリックをお願いいたします。
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu 行列および配列 finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!