Is this homework?
Here is some code that will do what you want:
[MinA indexToMinA] = min(A);
rightOfMinA = A(indexToMinA+1:end);
sumRightOfMinA = sum(rightOfMinA);
There are at least two things you need to be careful of with this simple solution:
- What do you want to do if the minimum is not unique?
- What do you want to do if the minimum is at the right end of the vector?
These can be handled easily, once you know what you want to do. Maybe you can work that out for yourself. (I suggest a careful read of "doc min", too.)