Azzera filtri
Azzera filtri

2D plot of x*sin(1/x)

6 visualizzazioni (ultimi 30 giorni)
feeroz babu
feeroz babu il 15 Dic 2020
Commentato: Stephen23 il 15 Dic 2020
x = [-1/pi:0.01:1/pi];
y = x*(sin(1/x));
plot(x,y)

Risposta accettata

KSSV
KSSV il 15 Dic 2020
Modificato: KSSV il 15 Dic 2020
x = [-1/pi:0.01:1/pi];
y = x.*(sin(1./x)); %<------ element by element operation
plot(x,y)

Più risposte (1)

Walter Roberson
Walter Roberson il 15 Dic 2020
y = x.*(sin(1./x));
In MATLAB the * operator is algebraic matrix multiplication (inner product) and the / operator is matrix division (which is similar to matrix multiplication by pinv() of the array)

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Tag

Prodotti


Release

R2014b

Community Treasure Hunt

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

Start Hunting!

Translated by