why can't i draw diagram of function abs(sin3x/sin(x/2)) in matlab?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
my code:
x=-pi:0.1:pi;
y=abs(sin(3*x)/sin(x/2));
plot(x,y);
0 Commenti
Risposta accettata
Star Strider
il 13 Apr 2017
Because you are not using element-wise division (with the ‘dot’ operator, as ‘./’).
This works:
x=-pi:0.1:pi;
y=abs(sin(3*x)./sin(x/2));
plot(x,y);
7 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Logical 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!