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

6 visualizaciones (últimos 30 días)
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 comentario
Walter Roberson
Walter Roberson el 24 de Feb. de 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);

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Tables en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by