Effacer les filtres
Effacer les filtres

Deciphering an Error message

2 vues (au cours des 30 derniers jours)
Brooke
Brooke le 2 Avr 2012
What does the following error message mean?
??? Index exceeds matrix dimensions.
Error in ==> clabel>inline_labels at 172
    if strcmp(get(h(1), 'Type'), 'patch') && ~strcmp(get(h(1), 'FaceColor'),
    'none')
Error in ==> clabel at 111
                    h = inline_labels(cax, cs, varargin{:});
Thank you.

Réponse acceptée

Walter Roberson
Walter Roberson le 2 Avr 2012
Brooke, for some values of n, there would be no data below the choosen n, and so there would be no contour line drawn. The handle returned, h, would be empty. Feeding an empty handle to clabel causes the message you see.

Plus de réponses (1)

Sean de Wolski
Sean de Wolski le 2 Avr 2012
x = rand(2,2)
x is now a 2x2 matrix.
If I try to get x(3,3):
x(3,3)
I'll get that error because x(3,3) doesn't exist since it's 2x2
  3 commentaires
Sean de Wolski
Sean de Wolski le 2 Avr 2012
What are you entering for n?
Brooke
Brooke le 2 Avr 2012
It works when I enter say 1, 0.2, 0,5 etc but stops working when I entered anything greater than 3 (or maybe some tighter bound)...

Connectez-vous pour commenter.

Catégories

En savoir plus sur Contour Plots dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by