필터 지우기
필터 지우기

Interpolating Arrays to be Same Size

조회 수: 16 (최근 30일)
Andrew
Andrew 2023년 4월 18일
답변: Matt J 2023년 4월 18일
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?

답변 (1개)

Matt J
Matt J 2023년 4월 18일
interp1(dP,linspace(1,numel(dP),numel(iP)))

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by