Find minimum points matlab

Hey,
I need to find minimum points. I wrote this code -
syms x real
f=(x^2)-4*x+9;
d1=diff(f,1);
res=solve(d1==0);
min(vpa(res,4))
and i get the answer - is this correct? and if I want to find the Y, so what I need to do?
ans =
2.0

回答 (1 件)

KSSV
KSSV 2020 年 10 月 20 日
編集済み: KSSV 2020 年 10 月 20 日

0 投票

subs(d1,res)
You will get it as zero.....so the value x = 2 is a root to d1.
Also your d1 = 2*x-4.
On solving manually 2*x-4 = 0, you will get x = 2.

5 件のコメント

Noa  Yelin
Noa Yelin 2020 年 10 月 20 日
and if I want to know the Y also, what I need to do?
KSSV
KSSV 2020 年 10 月 20 日
Y?? What is Y?
Noa  Yelin
Noa Yelin 2020 年 10 月 20 日
I need to whole point (2,5)
so I got only x=2, how can I print the 5?
KSSV
KSSV 2020 年 10 月 20 日
As your d1 is a linear equation.....you will get only one root.
Noa  Yelin
Noa Yelin 2020 年 10 月 20 日
Thank you

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

カテゴリ

ヘルプ センター および File ExchangeMathematics についてさらに検索

製品

質問済み:

2020 年 10 月 20 日

コメント済み:

2020 年 10 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by