Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

I need help on how to find the maximum

  1. Dec 1, 2011 #1
    I'm new on matlab and I need to find the value that make the derivative of a function = 0 in order to find the maximum of my function

    I started by defining the variable T

    >> syms T

    Then I but my function

    >> f=((((cos(T))^2+(sin(T)*cos(T)))^2)+3*(((sin(T))^2+(sin(T)*cos(T)))^2))^(0.5)

    Then I diffrentiate the function with respect to T

    >> diff(f,T)

    But know i want to find the value that make my function equal to zero but I cant figure it out espically that I'm new on matlab

    If anybody can help me I'll be thankfull
     
  2. jcsd
  3. Dec 1, 2011 #2

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    help findpeaks

    http://www.mathworks.com/help/toolbox/signal/ref/findpeaks.html


    When you use matlab for this you are representing a continuous function by a discrete one. For this reason, the exact point of the extreema may not have been included in your data set. So - differentiating the function and looking for the points that are equal to zero will usually be unhelpful.
     
  4. Dec 3, 2011 #3
    Thanks that was very helpfull
     
    Last edited by a moderator: Dec 29, 2011
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: I need help on how to find the maximum
  1. I need help in Matlab (Replies: 0)

  2. I need help with Excel (Replies: 2)

Loading...