Matlab plots my equation wrong
Ältere Kommentare anzeigen
x=-20:0.1:20;
f2=x.^10-1;
plot(x,f2)

I cant understand why it sketches my basic code wrong.
5 Kommentare
Walter Roberson
am 22 Mär. 2019
It looks right to me. You might have overlooked the "x 10^12" on the upper left of the y axis.
Melih Aksoy
am 22 Mär. 2019
Bearbeitet: Melih Aksoy
am 22 Mär. 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
am 22 Mär. 2019
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
