Neural Network to approximate function

Hello I am trying to create a Neural Network to predict a function (Rosenbrock function). I desire to use the toolbox provided by MATLAB but i don't know which function to use. Can someone help me? The Rosenbrock function looks like this: Hope someone is willing to help me.

回答 (1 件)

Umang Pandey
Umang Pandey 2023 年 9 月 25 日

0 投票

Hi Tobias,
The rosenbrock function is provided within the Deep Learning toolbox. Here is the code for the same:
function [y,dydx] = rosenbrock(x)
y = 100*(x(2) - x(1).^2).^2 + (1 - x(1)).^2;
dydx = dlgradient(y,x);
end
For more information, refer the following documentation:

カテゴリ

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

製品

リリース

R2021b

質問済み:

2022 年 5 月 6 日

回答済み:

2023 年 9 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by