fitplot

バージョン 1.0.0.0 (1.59 KB) 作成者: Andrew Bliss
Adds a linear fit to each data series in a plot
ダウンロード: 1.6K
更新 2006/4/5

ライセンスがありません

% With no input arguments, FITPLOT will plot a linear fit to each "line"
% data series that has a "marker" in the current axes. It will also put
% the equation describing the fit and the correlation coefficient in the
% upper left corner of the plot. NaNs are removed from the data. A flag
% is added to the equation if NaNs were present.
%
% FITPLOT(H) where H is a handle to a data series, will plot a linear fit
% to the data series. H can be a vector with multiple handles.
%
% FITPLOT(...,'robust') uses a robust fit instead of a regular fit.
%
% FITPLOT could be extended to handle other types of curves (polynomials,
% exponentials, etc).
%
% Example:
% x=(1:100)';
% a=-3*x+400+100*rand(100,1); %Noisy data with NaNs
% a([10 32 56])=nan;
% b=2*x+20; %Simple data with a perfect correlation
% c=10*x-200+50*randn(100,1); %More noisy data
% figure
% plot(x,a,'.',x,b,'r.',x,c,'g.')
% fitplot

引用

Andrew Bliss (2024). fitplot (https://www.mathworks.com/matlabcentral/fileexchange/10637-fitplot), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R14
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0