Reputation: 399
I have function in this case a cost function for categorisation in machine learning that hat 3 variables: y, x, theta
j = y*log(1/(exp(-theta*x) + 1)) - log(1 - 1/(exp(-theta*x) + 1))*(y - 1)
The questions for matlab:
Of course, no. 2 I can do in my mind or on paper. So that's more kinda how-to question for matlab for later, more complicated uses.
Thanks.
Upvotes: 0
Views: 38
Reputation: 18838
You can use subs
first, and then plot the function by substituting theta
by y
,as it is needed the variables be x
and y
:
fsurf(subs(subs(j, 'y', 0), 'theta', 'y'))
Upvotes: 1