expand length of matrix to fixed value

2 visualizaciones (últimos 30 días)
Morten Jørgensen
Morten Jørgensen el 24 de En. de 2020
Respondida: Adam el 24 de En. de 2020
I have problem expand a matrix
t is a 108x1 double, it contains a time vector 108 values in seconds.
How can I extend this matrix, so in contains 200 values with min(t) to max(t)?
the goal is to have t = to a 200x1 double

Respuesta aceptada

Adam
Adam el 24 de En. de 2020
t = interp1( 1:108, t, linspace(1, 108, 200 ) );
would be one way to do it.

Más respuestas (0)

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!

Translated by