How to make a matrix with negative indexes?

조회 수: 20 (최근 30일)
Brooke Gest
Brooke Gest 2019년 4월 19일
댓글: Stephen23 2019년 4월 19일
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
Stephen23
Stephen23 2019년 4월 19일
It sounds as if you might be trying to define a function of an independent variable. Please explain your algorithm in more detail.

댓글을 달려면 로그인하십시오.

답변 (2개)

Walter Roberson
Walter Roberson 2019년 4월 19일
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 2019년 4월 19일
It's explained pretty well in the FAQ: click here

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by