How to plot y = cos(pi/4)
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
James Crowe
il 26 Ott 2017
Commentato: James Crowe
il 26 Ott 2017
How do you plot y = cos(pi/4)? Thank you
2 Commenti
Roger Stafford
il 26 Ott 2017
That is a constant value, namely 1/sqrt(2). It will not give you something to plot.
Risposta accettata
Roger Stafford
il 26 Ott 2017
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-‘)
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Line Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!