Ask an expert. Trust the answer.

Your academic and career questions answered by verified experts

MATLAB - how do I find the first index where value is greater than threshold [duplicate]

Date: 2022-07-07 11:56:21

Possible Duplicate:
Given a vector a=[1,2, 3.2, 4, 5] and an element x=3 In vector a, how to find the exact entry which is bigger than x? 

Let's say a[] is a sorted vector. How do I find the first(smallest) index ix such that a(ix) > threshold? 

Answers: 

 

ix = find(a>threshold,1);

Pretty sure this will work


Why Matlabhelpers ?

Our Matlab assignment helpers for online MATLAB assignment help service take utmost care of your assignments by keeping the codes simple yet of high-quality. We offer the most reliable MATLAB solutions to students pursuing their Computer Science course from the Monash University, the University of Sydney, the University of New South Wales, the University of Melbourne; to name a few. Approach us today for best Matlab solutions online!

whatsApp order on matlabhelpers.com

telegram order on matlabsolutions.com