Why is the interp1 function is returning all zeros? I try to interpolate excell data.

6 vues (au cours des 30 derniers jours)
juan Ortiz
juan Ortiz le 24 Fév 2018
Commenté : Walter Roberson le 24 Fév 2018
able1 = xlsread ('TTB_Table_1_digitized');
Table6 = xlsread('TTB_Table_6_digitized');
Proof = Table6 (:,1);
SGair = Table6 (:,4);
Achol = Table6 (:,2);
SGV = Table6(:,5);
alpha = 25*10^-6;
DensityWater = 0.99904;
Tempex1 =[24 25 25 25.6 25.2 24.2 24.1 24.1];
% calcuating C2 by using the interpolstion function.
for i = length(SGair)
C(i) = interp1(Proof,SGV,SGair(i));
end
for i = length(C)
SG(i) = C(i)/DensityWater;
end
  1 commentaire
Walter Roberson
Walter Roberson le 24 Fév 2018
We don't know -- we have no information on the range of data that you are interpolating.
Note:
for i = length(SGair)
C(i) = interp1(Proof,SGV,SGair(i));
end
can be replaced by
C = interp1(Proof, SGV, SGair);

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Tables dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by