Interpolation with some fix interval
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi Every body,
I have different vectors whose values are between 0-1. The vectors are of different size. Now I want to fit them in one matrix.
Lets say one vector is of 10 ( a ) elements and second ( b ) is of 60 elements. Now I interpolate the values of vector a to six times and now I can fit both a and b into one matrix. Problem comes when a is of size 19 or 17 and I want to interpolate it upto 60 values. Is it possible ?
For interpolation I am using interp function.
0 Commenti
Risposta accettata
Shashank Prasanna
il 12 Mar 2013
You can do the following using interp1:
a = randn(17,1);% a is some vector with length of 17
l = length(a);
yi = interp1(1:l,a,linspace(1,l,60))
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Interpolation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!