MATLAB Answers

0

How to make a matrix with negative indexes?

Asked by Brooke Gest on 19 Apr 2019
Latest activity Commented on by Stephen Cobeldick on 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 Comment

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

Sign in to comment.

Tags

2 Answers

Answer by Image Analyst
on 19 Apr 2019

It's explained pretty well in the FAQ: click here

  0 Comments

Sign in to comment.


Answer by Walter Roberson
on 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.

  0 Comments

Sign in to comment.