Graph won't display
18 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Jamie Baxter
le 4 Fév 2019
Réponse apportée : Kevin Phung
le 4 Fév 2019
I was trying to plot a simple graph of y = x^2 / (pi*(1-x)) but the graph is not displaying
The following code just displayed one point on the graph,
x = linspace(0,10,100)
y = x.^2 / (pi*(1-x))
plot(x,y)
Does anyone know why this is not working?
0 commentaires
Réponse acceptée
Kevin Phung
le 4 Fév 2019
you need to do element wise operations with a period before:
x = linspace(0,10,100)
y = x.^2 ./ (pi.*(1-x))
plot(x,y)
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Graph and Network Algorithms dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!