Interpolation with some fix interval
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuesta aceptada
Shashank Prasanna
el 12 de Mzo. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Interpolation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!