How can I sum two plots that don´t have the same number of elements?
조회 수: 2 (최근 30일)
이전 댓글 표시
I have the following case which represents the pressure distribution over a profile:

I want to separate the intrados and extrados sections and calculate the sum of it. I´ve divided my data but the 2 parts don´t have the same number of elements. For example, I have 170 data points for the entire plot and 94 of them are data from intrados and the rest is extrados.
I can divide it and represent it:

but I have troubles with performing the sum. I need to create extra points somehow so the 2 data sets have the same number, how can I do it?
댓글 수: 0
채택된 답변
Sam Chak
2022년 5월 26일
I think one of the methods is to perform data interpolation using interp1 so that both curves are interpolated at the same point coordinates.
https://www.mathworks.com/help/matlab/ref/interp1.html
댓글 수: 6
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

