The teacher is looking for a "for" loop and "if" This is right from the question "that steps through x values from xMin to xMax with step size stepSize, calculates the value of f (x) there and keeps track of the largest y value and the corresponding x value. At the end, use the disp() and string() commands to print out your findings in the form" He also put this in there "function y = f(x) //the function to be searched for a maximum value y = sin(x).*exp(-x); endfunction yMax = f(xMin); Thank you for your help!

2 件のコメント

Rik
Rik 2017 年 9 月 7 日
Also: you can find guidelines for posting homework on this forum here.

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

回答 (0 件)

カテゴリ

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

タグ

質問済み:

2017 年 9 月 7 日

コメント済み:

Rik
2017 年 9 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by