Are there any way to handle this?

Discussion in 'MATLAB' started by Yang Zhang, Apr 13, 2007.

  1. Yang Zhang

    Yang Zhang Guest

    Hi All!

    I am having a problem on using function function.
    Suppose I have a function g = f(x,y)

    in one iteration, y is set to 0, I want to use:
    fsolve(@g,x0)

    How can I pass y = 0 into function g?

    Thanks a lot,
    Yang
     
    Yang Zhang, Apr 13, 2007
    #1
    1. Advertisements


  2. fsolve(@(x) g(x,0),x0)

    John
     
    John D'Errico, Apr 13, 2007
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.