Smooth Function not working

5 ビュー (過去 30 日間)
Emily Dickens
Emily Dickens 2017 年 7 月 12 日
回答済み: Justin Lines 2018 年 8 月 28 日
When I try to use the smooth function it says that it is an undefined function of variable. I am trying to analyze data of a graph. Here is the script:
LOWER_LIMIT = 60;
SULFUR_LIMIT = 325;
UPPER_LIMIT = 600;
T_Sulfur = Ts((Ts>LOWER_LIMIT) & (Ts<SULFUR_LIMIT));
T_Carbon = Ts((Ts>SULFUR_LIMIT) & (Ts<UPPER_LIMIT));
W_Sulfur = smooth(Weight((Ts>LOWER_LIMIT) & (Ts<SULFUR_LIMIT)),75);
W_Carbon = smooth(Weight((Ts>SULFUR_LIMIT) & (Ts<UPPER_LIMIT)),100);
plot(T_Sulfur, W_Sulfur * 100 / max(W_Sulfur));
plot(T_Carbon, W_Carbon * 100 / max(W_Carbon));
xlabel('Temperature (°C)');
ylabel('Weight (%)');
RelativeSulfurWeightLoss=((max(Weight((Ts>LOWER_LIMIT) & (Ts<SULFUR_LIMIT)))) - (min(Weight((Ts>LOWER_LIMIT) & (Ts<SULFUR_LIMIT)))) / (max(Weight((Tx>LOWER_LIMIT) & (Ts<SULFUR_LIMIT)))))
RelativeSulfurWeightRemaining = 1 - ((max(Weight((Ts>LOWER_LIMIT) & (Ts<SULFUR_LIMIT)))) - (min(Weight((Ts>LOWER_LIMIT) & (Ts<SULFUR_LIMIT)))) / (max(Weight((Tx>LOWER_LIMIT) & (Ts<SULFUR_LIMIT)))))
RelativeCarbonWeightLoss=((max(Weight((Ts>SULFUR_LIMIT) & (Ts<UPPER_LIMIT)))) - (min(Weight((Ts>SULFUR_LIMIT) & (Ts<UPPER_LIMIT)))) / (max(Weight((Tx>SULFUR_LIMIT) & (Ts<UPPER_LIMIT)))))
RelativeCarbonWeightRemaining = 1 - ((max(Weight((Ts>SULFUR_LIMIT) & (Ts<UPPER_LIMIT)))) - (min(Weight((Ts>SULFUR_LIMIT) & (Ts<UPPER_LIMIT)))) / (max(Weight((Tx>SULFUR_LIMIT) & (Ts<UPPER_LIMIT)))))
  1 件のコメント
KSSV
KSSV 2017 年 7 月 12 日
smooth comes with curvefit toolbox...do you have that toolbox? What does which smooth gives?

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

回答 (2 件)

Torsten
Torsten 2017 年 7 月 12 日
Type "ver" to see whether you have a licence for the Curve Fitting Toolbox.
Best wishes
Torsten.
  2 件のコメント
Emily Dickens
Emily Dickens 2017 年 7 月 12 日
I do have the Curve Fitting Toolbox, but it still isn't working.
Torsten
Torsten 2017 年 7 月 12 日
Other commands from the Curve Fitting Toolbox work, e.g. "fit" ?
Best wishes
Torsten.

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


Justin Lines
Justin Lines 2018 年 8 月 28 日
Was the smooth function always part of an add on?

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by