フィルターのクリア

Line of Best Fit to a subsection of data

2 ビュー (過去 30 日間)
C Meek
C Meek 2012 年 1 月 18 日
Hi there,
Say I have a graph of data ranging ranging over x-axis values of 0 to 2. It is easy to put a line of best fit into this data by using tools>basic fitting. What I would like to know is if it is possible to plot a line of best fit from 0 to 1, while still retaining the data from 1 to 2?
Thanks in advance for any help.

回答 (1 件)

Sven Schoeberichts
Sven Schoeberichts 2012 年 1 月 18 日
Check the function polyfit with order = 1 for a best-fit straight line. Make sure the data range to use polyfit with is your data from 0:1

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by