Matlab plots my equation wrong
Mostrar comentarios más antiguos
x=-20:0.1:20;
f2=x.^10-1;
plot(x,f2)

I cant understand why it sketches my basic code wrong.
5 comentarios
Walter Roberson
el 22 de Mzo. de 2019
It looks right to me. You might have overlooked the "x 10^12" on the upper left of the y axis.
Melih Aksoy
el 22 de Mzo. de 2019
Editada: Melih Aksoy
el 22 de Mzo. de 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
el 22 de Mzo. de 2019
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
