Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8346677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:05:47+00:00 2026-06-09T07:05:47+00:00

I have many different data sets which are discrete data. The local minimum is

  • 0

I have many different data sets which are discrete data. The local minimum is not necessary the smallest data but it is the valley around the first peak. I am trying to find the indices of the first valley around the the first peak. My idea is to search the difference between two neighbor points and when the difference is less than some critical value and when the forward point larger than the backward point, then that’s the point we wanted. e.g.

for k=PEAK_POS:END_POS
  if ( (abs(y(k)-y(k-1))<=0.01) && (y(k-1)>y(k)) )
    expected_pos = k;
    break;
  end
end

this works for some data set but not for all since some dataset might have different sample step so we might change the critical condition but I have so many data set to analyse, I don’t think I can analyze each set manually. I am looking for any better way to find that minimum. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T07:05:49+00:00Added an answer on June 9, 2026 at 7:05 am

    As mentioned by @JakobS., optimization theory is a large field in Mathematics, with its own journals and conferences and everything.

    Your problem does not sound complicated enough to justify the optimization toolbox (correct me if I’m wrong). It sounds like fminsearch is sufficient for your needs. Here’s a brief tutorial for it. Type help fminsearch or doc fminsearch for more info.

    % example cost function to minimize
    z = @(x) sin(x(:,1)).*cos(x(:,2));
    
    % Make a plot 
    x = -pi:0.01:pi;
    y = x;
    [x,y] = meshgrid(x,y);
    figure(1), surf(x,y, reshape(z([x(:) y(:)]), size(x)), 'edgecolor', 'none')
    
    % find local minimum
    [best, fval] = fminsearch(z, [pi,pi])
    

    The result is

    best =
         1.570819831365890e+00     3.141628097071647e+00
    fval =
        -9.999999990956473e-01
    

    Which is obviously a very reasonable approximation to the expected local optimum.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have many different small classes which have a few fields each, e.g. this:
I have looked at many different peoples answers to this problem but they only
I have many tables with identical schemas but different names. Can I create a
I have many different arrays with dictionaries of hotels in a data model class.
I have many different NSArray 's stored in .dat files, in the Documents folder
In my application I have many different JSP forms with multiple stages, that is
I want to submit a form that have many checkboxes with different values, using
I have an application with many different parts, it runs on OSGi, so there's
i have hundreds of [mostly different] files in many different directories that all have
I have many layers in the Documents that will be displayed on different user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.