pointers

13 vues (au cours des 30 derniers jours)
mallikarjun
mallikarjun le 1 Avr 2012
i arranged matrix or array in ascending order, how Establish a set of pointers P to address the start and end of each block of records that have same value.
  1 commentaire
Walter Roberson
Walter Roberson le 1 Avr 2012
MATLAB does not have any pointer data type.

Connectez-vous pour commenter.

Réponse acceptée

Titus Edelhofer
Titus Edelhofer le 1 Avr 2012
Hi,
use the function diff to find the jumps, i.e., the position where the difference is not zero:
p = find(diff(x)~=0);
Titus
  1 commentaire
mallikarjun
mallikarjun le 1 Avr 2012
hi Edelhofer
thank for your answer.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by