Matlab plots my equation wrong
Afficher commentaires plus anciens
x=-20:0.1:20;
f2=x.^10-1;
plot(x,f2)

I cant understand why it sketches my basic code wrong.
5 commentaires
Walter Roberson
le 22 Mar 2019
It looks right to me. You might have overlooked the "x 10^12" on the upper left of the y axis.
Melih Aksoy
le 22 Mar 2019
Modifié(e) : Melih Aksoy
le 22 Mar 2019
"was expecting to get graph of x^10-1 which is"
That is exactly what you already have. Again, you are just ignoring the multiplier at the top of the y-axis. Set the y-limits to [-1,3] and you will see the part of the curve that you expect.
Melih Aksoy
le 22 Mar 2019
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
