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

6 ビュー (過去 30 日間)
juan Ortiz
juan Ortiz 2018 年 2 月 24 日
コメント済み: Walter Roberson 2018 年 2 月 24 日
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 件のコメント
Walter Roberson
Walter Roberson 2018 年 2 月 24 日
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);

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeTables についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by