I have to solve the following problem; I hope that someone can help me.
I would like to solve the function and obtain a vector x = [x(1); x(2)]
for varying values of theta and the vector p =[ p(1); p(2)]
I could use the 'fsolve' command for one specific case, but I have to do this 77 times for changing values of p and theta.
e.g. if I insert
>>
x0 = [0.7; 1]
x = fsolve('findphi', x0)
>>
The values of the coefficients are not known to the function 'findphi' although present in workspace.
Does anybody know how I can pass these coefficients to my function?
Is there any suitable way for stack processing this?
Thank you for your help-.
Gyusok
Subject: how to solve a set of nonlinear equation systems with changing coefficients
"Gyusok " <gyusok@gmail.com> wrote in message
news:hcpse6$7ac$1@fred.mathworks.com...
> Hello,
>
> I have to solve the following problem; I hope that someone can help me.
> I would like to solve the function and obtain a vector x = [x(1); x(2)]
> for varying values of theta and the vector p =[ p(1); p(2)]
>
>>>
> function findphi = findphi(x)
> findphi = [cos(theta)*(sin(x(1)) - x(2)*x(1)*cos(x(1))) + ...
> sin(theta) * (cos(x(1)) + x(2) * x(1) * cos(x(1))) - p(1) ;
> -sin(theta) * (sin(x(1)) - x(2) * x(1) * cos(x(1))) + ...
> cos(theta) * (cos(x(1)) + x(2) * x(1) * cos(x(1))) - p(2)];
>>>
>
> I could use the 'fsolve' command for one specific case, but I have to do
> this 77 times for changing values of p and theta.
>
> e.g. if I insert
>
>>>
> x0 = [0.7; 1]
> x = fsolve('findphi', x0)
>>>
> The values of the coefficients are not known to the function 'findphi'
> although present in workspace.
> Does anybody know how I can pass these coefficients to my function?
>
> Is there any suitable way for stack processing this?
>
> Thank you for your help-.
>
> Gyusok
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.