Is this behavior documented (for R2013a)
>> ix = 1:[4:12]
ix =
1 2 3 4
The Code Analalyzer issues a warning but Matlab evaluates the code without warning or error. I think a warning is appropriate.
&nbsp

 Respuesta aceptada

Sean de Wolski
Sean de Wolski el 30 de Dic. de 2014
Editada: Sean de Wolski el 30 de Dic. de 2014

0 votos

Documented:
web(fullfile(docroot, 'matlab/ref/colon.html'))
If you specify nonscalar arrays, MATLAB interprets j:i:k as j(1):i(1):k(1)

1 comentario

per isakson
per isakson el 30 de Dic. de 2014
... but it will let coding mistakes pass unnoticed.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre App Building en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 30 de Dic. de 2014

Comentada:

el 30 de Dic. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by