finding the minimum value of a function and corresponding x_min

3 ビュー (過去 30 日間)
NILESH PANDEY
NILESH PANDEY 2017 年 2 月 8 日
コメント済み: KSSV 2017 年 2 月 8 日
now after running this code we got plot like parabola by figure anyone can find what is the minimum value of phi1 and at which x it is minimum can any one suggest me how to find the minimum phi1 and what is x_min by code not by figure.so far i am using this code but by this i get incorrect value of x_min that's why i also get wrong min_phi1,x_min should be L/2 and this can be verified by the plot code is attached with question

採用された回答

KSSV
KSSV 2017 年 2 月 8 日
doc min.
[val,idx] = min(phi1) ; % get minimum value of phi1 and it's index
x_min = x(idx) % x at which phi1 is minimum
phi1_min = val % minimum phi1
  2 件のコメント
NILESH PANDEY
NILESH PANDEY 2017 年 2 月 8 日
Thank You Sir for help i have asked one more question yesterday as : i have to find the value of y(i) till y(i)-y(i-1)<=2.59e-4 can anyone help me with the code first correcting the error then how can i again start the iteration if y(i)-y(i-1)=>2.59e-4 necessary file is attached with question can you help me with the same
KSSV
KSSV 2017 年 2 月 8 日
This code shows error...rectify it..

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by