[問題] 函數極大極小值問題已回收
我有一個函數 y=2*x+1 要求區間0~3的極大極小值我是這樣寫的
>> [x, min_value] = fminbnd('2*x+1',0,3)
x =
4.2419e-005
min_value =
1.0001
結果他顯示是1.0001,照理講應該是1才對
>> [x, max_value] = fminbnd('2*x+1',0,3)
x =
4.2419e-005
max_value =
1.0001
結果他顯示是1.0001,照理講應該是7才對
...不知道是我哪裡搞錯了?希望有好心人幫我解惑,感謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.113.152.193
推
10/11 00:01, , 1F
10/11 00:01, 1F
→
10/11 00:02, , 2F
10/11 00:02, 2F
→
10/11 00:02, , 3F
10/11 00:02, 3F
→
10/11 01:00, , 4F
10/11 01:00, 4F
→
10/11 13:20, , 5F
10/11 13:20, 5F
→
10/11 13:21, , 6F
10/11 13:21, 6F
→
10/11 13:21, , 7F
10/11 13:21, 7F
→
10/11 13:21, , 8F
10/11 13:21, 8F
→
10/11 13:21, , 9F
10/11 13:21, 9F
MATLAB 近期熱門文章
PTT數位生活區 即時熱門文章