Matlab plots my equation wrong
Mostra commenti meno recenti
x=-20:0.1:20;
f2=x.^10-1;
plot(x,f2)

I cant understand why it sketches my basic code wrong.
5 Commenti
Walter Roberson
il 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
il 22 Mar 2019
Modificato: Melih Aksoy
il 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
il 22 Mar 2019
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Annotations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
