why gradient and diff return many values?

2 views (last 30 days)
huda nawaf
huda nawaf on 7 Mar 2021
Commented: huda nawaf on 7 Mar 2021
hello,
I need use the derivatives for example in loss function is J(w,b) such that find
w=w-α * (∂J/ ∂w)
when I used diff or gradient I have many values, In fact I need only one value represent (∂J/ ∂w).
Please, can one help me to provide me with that command.
Thanks in advance
  4 Comments
huda nawaf
huda nawaf on 7 Mar 2021
@ Jan
In fact I just need compute the derivative, and I know when compute the derivative for one variable I shoud get one value.
that is mean I did not use the right command. I want to calculate the derivative for one variable respect to functionnd

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!