Get a value of non existant index of array by interpolation
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
CLEBER ALBERT
am 3 Sep. 2016
Beantwortet: Star Strider
am 3 Sep. 2016
Im trying to remember a function in Matlab which returns a value of non existant index of array by interpolation.
eg:
arry = [4 5 6];
index = 1.5;
suchfunction(arry,index) %should return a value between the index 1 and 2 by interpolation (would be 4.5)
ans = 4.5
Could someone help me!?
0 Kommentare
Akzeptierte Antwort
Star Strider
am 3 Sep. 2016
Use the interp1 function:
arry = [4 5 6];
idx = 1:3;
idxi = 1.5;
arryi = interp1(idx, arry, idxi)
arryi =
4.5
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!