Matlab < Matlab < Mathe-Software < Mathe < Vorhilfe
|
Status: |
(Frage) beantwortet | Datum: | 13:39 Do 23.03.2006 | Autor: | Yaya |
Aufgabe 1 | To find the zero(s) of a function |
Aufgabe 2 | Problem with fzero function in Matlab |
Hello,
I have the following problem with Matlab and I would be very happy if anyone could help me:
I use fzero to find the zero of a function gamma(N).
This works without any problems.
I now want to introduce another variable alpha so that the function gamma depends on two variables N and alpha. In other words, for a given value of alpha, I want to find N* so that gamma(N*)=0.
Nur für Erst-Poster
Of course, fzero doesn't work with a function composed of two variables.
Does anyone have an idea about how to solve this problem?
Ich habe diese Frage in keinem Forum auf anderen Internetseiten gestellt.
|
|
|
|
Hello Yaya,
i've had a look on matlab help and foundd:
X = FZERO(FUN,X0,OPTIONS,P1,P2,...) allows for additional arguments
which are passed to the function, F=feval(FUN,X,P1,P2,...). Pass an empty
matrix for OPTIONS to use the default values.
--> the parameters P1,...,PN are passed throuch FZERO to the function FUN specified in your call.
For your problem it should be:
x = fzero('gamma',N,[],alpha);
marthasmith
|
|
|
|