How to make a matrix with negative indexes?

I keep trying to make a matrix with negative indexes but this error pops up: Array indices must be positive integers or logical values. Does anyone know how to fix this?

1 comentario

Stephen23
Stephen23 el 19 de Abr. de 2019
It sounds as if you might be trying to define a function of an independent variable. Please explain your algorithm in more detail.

Iniciar sesión para comentar.

Respuestas (2)

Walter Roberson
Walter Roberson el 19 de Abr. de 2019

1 voto

Modify
Another approach is to sprintf() the list of indices into a character vector, and use that as a key for containers.Map() . Some work would be involved if you wanted to use : indices or range indices.

Categorías

Etiquetas

Preguntada:

el 19 de Abr. de 2019

Comentada:

el 19 de Abr. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by