plot - Matlab: Plotting / Simplifying parametrized functions with fixed Parameters -
i have function in case cost function categorisation in machine learning 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 matlab:
- how can set e.g. y=0 , plot j j(y=0, theta, x) surface plot fsurf(j)?
- i tried equating y=0 , fsurf(j): error
- i tried assume (y=0): error
- same plot simplify function.
of course, no. 2 can in mind or on paper. that's more kinda how-to question matlab later, more complicated uses.
thanks.
you can use subs
first, , plot function substituting theta
y
,as needed variables x
, y
:
fsurf(subs(subs(j, 'y', 0), 'theta', 'y'))
Comments
Post a Comment