How to make a matrix with negative indexes?

21 visualizzazioni (ultimi 30 giorni)
Brooke Gest
Brooke Gest il 19 Apr 2019
Commentato: Stephen23 il 19 Apr 2019
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 Commento
Stephen23
Stephen23 il 19 Apr 2019
It sounds as if you might be trying to define a function of an independent variable. Please explain your algorithm in more detail.

Accedi per commentare.

Risposte (2)

Walter Roberson
Walter Roberson il 19 Apr 2019
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.

Image Analyst
Image Analyst il 19 Apr 2019
It's explained pretty well in the FAQ: click here

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by