How can I find the exponent of a log plot?

3 ビュー (過去 30 日間)
Janna Hinchliff
Janna Hinchliff 2019 年 2 月 25 日
コメント済み: Harshita Gupta 2019 年 3 月 8 日
I'm plotting some data on a log scale using the code
for k = 1:length(dataeachcurrent)
temparray(k) = 1000./(T.TIcell{dataeachcurrent{k}{1}/10}(dataeachcurrent{k}{2})+273);
timeto50array(k) = dataeachcurrent{k}{3};
end
semilogy(fliplr(temparray),fliplr(timeto50array),'*','Color',[0.5 0 0.5])
fitEa = polyfit(fliplr(temparray),fliplr(timeto50array),1);
plotfit = polyval(fitEa,fliplr(temparray));
plot(fliplr(temparray),plotfit,'k--')
where temparray and timeto50array are taken from a set of cell arrays. This gives me a linear gradient on a log scale on the y axis, but I need the value of the exponent (which I think is given by the gradient) but I'm unsure how to get this value from the parameters I have. How can I extract this?
  2 件のコメント
Stephan
Stephan 2019 年 2 月 26 日
Harshita Gupta
Harshita Gupta 2019 年 3 月 8 日
I guess lscurvefit shoul work for your problem.

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

回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by