how to plot this function?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti

0 Commenti
Risposta accettata
Image Analyst
il 5 Ott 2022
Modificato: Image Analyst
il 5 Ott 2022
Here is one way:
x = linspace(-pi, pi, 1000);
f = zeros(1, length(x));
f(abs(x) <= pi/2) = 1;
plot(x, f, 'b-', 'LineWidth', 2)
ylabel('f');
xlabel('x');
grid on;
and this: MATLAB Academy - Free 2 hour training
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Simulation, Tuning, and Visualization 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!

