Borrar filtros
Borrar filtros

Interpolating Arrays to be Same Size

16 visualizaciones (últimos 30 días)
Andrew
Andrew el 18 de Abr. de 2023
Respondida: Matt J el 18 de Abr. de 2023
I've got two arrays that will change size depending on the dataset that I'm feeding into my script. For the purposes of this question, let's say I have iP_Axial setup as a double format array having size 230174x1, and dP_Axial setup as a double format array having size 59503x1. For comparison between the two arrays later in my script, I need both arrays to be the same size.
I believe I need to interpolate the dP_Axial array to force it to the same size as iP_Axial, but I can't wrap my head around the best way to do so. Can I ask for tips and guidance on doing this?

Respuestas (1)

Matt J
Matt J el 18 de Abr. de 2023
interp1(dP,linspace(1,numel(dP),numel(iP)))

Categorías

Más información sobre Interpolation en Help Center y File Exchange.

Productos


Versión

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by