フィルターのクリア

Equation of the Line in command window

4 ビュー (過去 30 日間)
Ashley Megow
Ashley Megow 2020 年 10 月 8 日
コメント済み: Star Strider 2020 年 10 月 8 日
I have a graph, with an equation, but i need to display that equation into the command window.

採用された回答

Star Strider
Star Strider 2020 年 10 月 8 日
Try this:
B = [y(:) ones(size(y(:)))] \ x(:);
fprintf('Linear: y = %.4f*x%+.2f', B) % Display In Command Window
text(0, max(ylim), sprintf('Linear: y = %.4f*x%+.2f', B), 'HorizontalAlignment','left', 'VerticalAlignment','top') % Display On Plot
.
  4 件のコメント
Ashley Megow
Ashley Megow 2020 年 10 月 8 日
Thank you
Star Strider
Star Strider 2020 年 10 月 8 日
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLarge Files and Big Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by