Effacer les filtres
Effacer les filtres

How can I retain original subscript indices for a matrix subset?

2 vues (au cours des 30 derniers jours)
Stephanie Diaz
Stephanie Diaz le 8 Juin 2017
Commenté : KSSV le 9 Juin 2017
Hi,
I have a matrix subset (from the original matrix, C) that I have created with the following code:
C_sub = C(((minx):(maxx)),((miny):(maxy)));
C_sub now has its own subscript indices, likely due to the fact that matlab now sees it as its own matrix. I need C_sub to somehow retain the subscript indices (or linear indices) from the original matrix (matrix C),or some way to call on the original indices. Is there a way to do this?
  1 commentaire
KSSV
KSSV le 9 Juin 2017
You have the indices already in hand...
((minx):(maxx)),((miny):(maxy))

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by