필터 지우기
필터 지우기

How can I add query points between two adjacent points of sampled data?

조회 수: 3 (최근 30일)
wd w
wd w 2024년 2월 24일
댓글: Voss 2024년 2월 25일
I have a representative subset of sample points as shown in column A (x), and intend to add query points (evenly) in interval of each two adjacent sample points of column A to make it as shown in column B (Xq).

채택된 답변

Voss
Voss 2024년 2월 24일
x = [1;3;4;6;10]
x = 5x1
1 3 4 6 10
n = 4; % number of points to insert in each interval
N = numel(x);
q = linspace(1,N,(n+1)*(N-1)+1);
Xq = interp1(1:N,x,q).'
Xq = 21x1
1.0000 1.4000 1.8000 2.2000 2.6000 3.0000 3.2000 3.4000 3.6000 3.8000
  댓글 수: 3
wd w
wd w 2024년 2월 25일
Voss and Stephen23, thank you very much!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by