필터 지우기
필터 지우기

How can i interpolate A and B to get C at a range of instance of A and B?

조회 수: 1 (최근 30일)
A B C
1000 19,3 401,7
1000 30,9 340,1
1000 74,5 279,2
1000 84,6 270,7
1000 91,7 271
1200 41,5 320,1
1200 72,4 276,7
1200 82,2 272,6
1200 93,8 266,4
1200 102,9 263,6
1400 121 263,6
1400 137 268,8
  댓글 수: 6
Walter Roberson
Walter Roberson 2018년 10월 9일
scatteredInterpolant()
But first you are going to have challenges reading the data file which appears to be using comma for the decimal place. What is the file format, and can you attach a sample of it so we can program a fix for your file format? Also which release are you using?
Shubham Mohan Tatpalliwar
Shubham Mohan Tatpalliwar 2018년 10월 9일
편집: Stephen23 2018년 10월 9일
function [Kraftstoffverbrauch,Drehzahl,Drehmoment,Geschwindigkeit,DrehmomentAchse]=Kasus2_1(Drehzahl,Drehmoment)
% Modify the dimensions
nx = length(Drehzahl) ;
ny = length(Drehmoment) ;
[num] = xlsread('Mappe2.xlsx') ;
Dz = num(:,1) ; Dz(isnan(Dz))= [ ];
Dm = num(:,2) ;Dm(isnan(Dm))= [ ];
Kv = num(:,3) ;Kv(isnan(Kv))= [ ];
F = scatteredInterpolant([Dz Dm],Kv);
for i= 1:1:nx
for j= 1:1:ny
Kraftstoffverbrauch(i,j) = F(Drehzahl(i),Drehmoment(j));
end
Geschwindigkeit= (Drehzahl/(1.534*2.64))*2.037*0.06;
DrehmomentAchse= (Drehmoment*1.534*2.64);
end
this the program but the result is not satisfactory.... so i want to go for any other method

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

채택된 답변

KSSV
KSSV 2018년 10월 9일
[num,txt,raw] = xlsread('Mappe2.xlsx') ;
x = num(:,1) ; y = num(:,2) ; z = num(:,3) ;
N = 100 ;
[X,Y] = meshgrid(linspace(min(x),max(x),N),linspace(min(y),max(y),N)) ;
Z = griddata(x,y,z,X,Y) ;
surf(X,Y,Z);
shading interp
hold on
plot3(x,y,z,'.r')

추가 답변 (0개)

카테고리

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