フィルターのクリア

How to plot y = cos(pi/4)

1 回表示 (過去 30 日間)
James Crowe
James Crowe 2017 年 10 月 26 日
コメント済み: James Crowe 2017 年 10 月 26 日
How do you plot y = cos(pi/4)? Thank you
  2 件のコメント
Roger Stafford
Roger Stafford 2017 年 10 月 26 日
That is a constant value, namely 1/sqrt(2). It will not give you something to plot.
James Crowe
James Crowe 2017 年 10 月 26 日
編集済み: James Crowe 2017 年 10 月 26 日
I need the straight line of it where y = constant. So it should be a straight line at 0.707

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

採用された回答

Roger Stafford
Roger Stafford 2017 年 10 月 26 日
Choose upper and lower limits of x as a and b. Choose the desired number of plot points as n.
x = linspace(a,b,n);
y = repmat(cos(pi/4),1,n);
plot(x,y,y-)
  1 件のコメント
James Crowe
James Crowe 2017 年 10 月 26 日
Thank you so much!

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by