- 40 lashes with a wet noodle so you’ll not do this again!
- Go back and rename your ‘ylim’ variables to something else, and that make sense in the context of your code (for example ‘fig_1_ylim’, ‘ylim_1’ or some such). You could also name it ‘Merlin’, ‘Cerrunos’, or whatever pleases you. Just don’t name it the same as a MATLAB built-in function and you’ll be fine.
- That should then work without problems.
Can not seem to correct the axis to my desired range, had it working before but now it won't
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
jake Hawley
el 27 de Dic. de 2015
Comentada: Star Strider
el 27 de Dic. de 2015
Subscript indices must either be real positive integers or logicals. Error in runmotor (line 62) ylim([-2 2])
0 comentarios
Respuesta aceptada
Star Strider
el 27 de Dic. de 2015
O.K. You created a variable ‘ylim’ that is ‘overshadowing’ (or more colloquially ‘shadowing’) the MATLAB built-in ylim function. So you believe you’re calling the ylim function when in fact you’re referring to your ‘ylim’ variable.
Confusion reigns!
Solution (and you’ll be relieved to know there is one):
If it doesn't, scream loudly at the moon and post back here in a few hours.
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Annotations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!