Filter löschen
Filter löschen

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

6 Ansichten (letzte 30 Tage)
feeroz babu
feeroz babu am 15 Dez. 2020
Kommentiert: Stephen23 am 15 Dez. 2020
x = [-1/pi:0.01:1/pi];
y = x*(sin(1/x));
plot(x,y)

Akzeptierte Antwort

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

Weitere Antworten (1)

Walter Roberson
Walter Roberson am 15 Dez. 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)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2014b

Community Treasure Hunt

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

Start Hunting!

Translated by