Effacer les filtres
Effacer les filtres

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

6 vues (au cours des 30 derniers jours)
feeroz babu
feeroz babu le 15 Déc 2020
Commenté : Stephen23 le 15 Déc 2020
x = [-1/pi:0.01:1/pi];
y = x*(sin(1/x));
plot(x,y)

Réponse acceptée

KSSV
KSSV le 15 Déc 2020
Modifié(e) : KSSV le 15 Déc 2020
x = [-1/pi:0.01:1/pi];
y = x.*(sin(1./x)); %<------ element by element operation
plot(x,y)
  1 commentaire
feeroz babu
feeroz babu le 15 Déc 2020
Thank you

Connectez-vous pour commenter.

Plus de réponses (1)

Walter Roberson
Walter Roberson le 15 Déc 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)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Produits


Version

R2014b

Community Treasure Hunt

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

Start Hunting!

Translated by