필터 지우기
필터 지우기

Interpolation of 3 dimensional values from a excel file

조회 수: 3 (최근 30일)
Shubham Mohan Tatpalliwar
Shubham Mohan Tatpalliwar 2018년 9월 24일
댓글: Adam 2018년 9월 24일
i got 10 values of x for each value of x i have 10 values of y and the values of z for each x depends on y
how should i interpolate them so that i can give any value of x and y in between the range to get ultimate value of z.
i have attached a file of values for more clarity.

채택된 답변

KSSV
KSSV 2018년 9월 24일
[num,txt,raw] = xlsread('Mappe1.xlsx') ;
x = num(:,1) ; x(isnan(x))= [ ];
A = num(:,2:end) ;
A(isnan(A(:,1)),:)= [] ;
Y = A(1:2:end,:) ;
Z = A(2:2:end,:) ;
X = repmat(x,1,size(Y,1)) ;
idx = ~isnan(Z) ;
F = scatteredInterpolant([X(idx) Y(idx)],Z(idx),'linear','none');
iwant = F(250,0.7)
  댓글 수: 5
Shubham Mohan Tatpalliwar
Shubham Mohan Tatpalliwar 2018년 9월 24일
when x and y are not of same length
Adam
Adam 2018년 9월 24일
Please don't use flags for things that should just be a comment, or in this case, just accepting the answer is enough to say it worked.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by