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:

  1. 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
  2. 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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -