Extended-maxima of an Array

3 Ansichten (letzte 30 Tage)
Meshooo
Meshooo am 26 Dez. 2012
Hello everyone, I have an array 'A1' that has 21 rows and 6 columns. I want to find the Extended-maxima of each column using the matlab imextendedmax function.
I don't know what is wrong with my code!
for x = 1:6
A1_Colm = imextendedmax(A1(:,x), 1) %Extended-maxima with 1 H-maxima transform
M (21,6) = A1_Colm1; % to save the results from each loop in a new array M
end
The following error appears Subscripted assignment dimension mismatch.
Any help will be highly appreciated.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 26 Dez. 2012
imexendedmax() returns an array the same size as its first input, A1(:,x) in this case. You are then trying to store that entire array into a single location, M(21,6).
I suspect that what you want is:
M(:,x) = A1_Colm1;
  1 Kommentar
Meshooo
Meshooo am 26 Dez. 2012
Yes, you are right. Thank you very very much..

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Language Fundamentals finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by