how to use axis ?

3 visualizaciones (últimos 30 días)
Aiachi Hiba
Aiachi Hiba el 22 de Mayo de 2017
Comentada: Aiachi Hiba el 22 de Mayo de 2017
hello, i want to know how to use "axis" to choose the points where i want to have my curve
i have this function whose plotted at points -200 to 200 when i tried
axis([-0.3 0.3 -40 40]) it shows
Subscript indices must either be real positive integers or logical.
so what should i do to get my function at the interval [-0.3 0.3 -40 40]?

Respuesta aceptada

Guillaume
Guillaume el 22 de Mayo de 2017
"when i tried axis([-0.3 0.3 -40 40]) it shows Subscript indices must either be real positive integers or logical"
That error messages means you're trying to index a variable. The most common cause of this error is that you have a variable called axis which shadows the axis function. The solution is to rename that variable to something that is not a function name.
  2 comentarios
Aiachi Hiba
Aiachi Hiba el 22 de Mayo de 2017
thanks, it was just as you said but now i got another error it said
Error using axis>LocSetLimits (line 234) Vector must have 4, 6, or 8 elements.
Error in axis (line 94) LocSetLimits(ax(j),cur_arg);
Error in nonlin (line 47) axis([-0,3 0.3 -40 40]);
what does it mean ? and Thanks in advance
Aiachi Hiba
Aiachi Hiba el 22 de Mayo de 2017
i already found the answer, thanks for your help.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Annotations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by