how to interpolate?

조회 수: 4 (최근 30일)
Shubham Mohan Tatpalliwar
Shubham Mohan Tatpalliwar 2018년 11월 6일
답변: Torsten 2018년 11월 6일
if true
% code
end
A=[302
300
303
315
302
301
307
305
319
313
298
293
290
309
320
362
375
390
392
380
374
366
345
337
337
342
324
328
320
317]
B=[0
0,5
1
1,5
2
2,5
3
3,5
4
4,5
5
5,5
6
6,5
7
7,5
8
8,5
9
9,5
10
10,5
11
11,5
12
12,5
13
13,5
14
14,5]
I have this data A is height in meters and
B is the distance in kilometer i.e 0.5km
how should i interpolate A for to get height at every meter
  댓글 수: 1
Akira Agata
Akira Agata 2018년 11월 6일
I believe interp1 is the function you are looking for!

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

채택된 답변

Torsten
Torsten 2018년 11월 6일
Bi=0:0.001:14.5;
Ai=interp1(B,A,Bi)

추가 답변 (1개)

madhan ravi
madhan ravi 2018년 11월 6일
Use
interp1()

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by