Comsol multiphysics; fzero and inline function with many parameters

  • Thread starter hadoque
  • Start date
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:
clear
myfun=inline('exp(y).*cos(x)+z', 'x', 'y', 'z');
x1 = fzero(myfun,-5,2,1)
This does not work:

Code:
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
 

Want to reply to this thread?

"Comsol multiphysics; fzero and inline function with many parameters" You must log in or register to reply here.

Related Threads for: Comsol multiphysics; fzero and inline function with many parameters

  • Posted
Replies
0
Views
1K
Replies
0
Views
6K
Replies
0
Views
997
Replies
0
Views
4K

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top