Finding maximum value, discounting a certain matrix place.

Hi Everyone,
Suppose I have a 1,m matrix, which I call sweep.
Suppose also, that I have identified I to be a relevant place in sweep.
What I wish to achieve is the following, except in search of the maximum value, the expression should not include the place I:
val = max(nonzeros(sweep));
How can I amend the above, to discount the place I?
Regards,
Ulrik.

Categories

Asked:

on 15 Jun 2011

Community Treasure Hunt

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

Start Hunting!