1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Comsol multiphysics; fzero and inline function with many parameters

  1. Nov 12, 2008 #1
    Hi
    I'm trying to get comsol multiphysics to first define an inline
    function with 1 variable and 4 parameters, and then run fzero on that
    same function. I can do it with two parameters, but no moore.

    This works:

    Code (Text):
    clear
    myfun=inline('exp(y).*cos(x)+z', 'x', 'y', 'z');
    x1 = fzero(myfun,-5,2,1)
    This does not work:

    Code (Text):
    clear
    myfun=inline('exp(y).*cos(x)+z+u', 'x', 'y', 'z', 'u');
    x1 = fzero(myfun,-5,2,1,0.3)

    C» test
    Error: Too few arguments to inline function.

    Would be thankful for any hints about this.


    /Johan
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you help with the solution or looking for help too?
Draft saved Draft deleted



Similar Discussions: Comsol multiphysics; fzero and inline function with many parameters
Loading...