"Nasser M. Abbasi" wrote in message <kpidf7$nd5$1@speranza.aioe.org>...
> On 6/15/2013 12:44 PM, Marcus Glover wrote:
> > R=phi1/theta1+phi2/theta2=(k1/k2)*(1+k3/k4)
> >
> > delta=sqrt(((k2+k3+k4)^2)4k2*k4)
> >
> > phi1=k1(theta1k3k4)/delta
> >
> > phi2=k1(theta2k3k4)/delta
> >
> > theta1=(k2+k3+k4+delta)/2
> >
> > theta2=(k2+k3+k4delta)/2
> >
> > I have numeric values for R, phi1, phi2, theta1, theta2.
> >I am tying to get numeric solutions for k1,k2,k3,k4.
>
>
> You have 6 equations in 4 variables ?
Do you have the optimization toolbox? If so, try fsolve().
Set up your function in its own mfile. Something like I did below.
doc fsolve. You will need to give it an initial guess for k. Double check what I tried below because I may have missed some parenthesis.
I agree with Nasser that your system as your currently state it is overdetermined. And you probably want to reduce it to 4 equations. I think f(1) in my "code" below is redundant and not needed. If you know phi1, phi2, theta1 and theta2 you know R, hence probably get rid of that.
If you can provide me with the work you tried and the values for phi's, theta's and R I can see what I get.....
function f = yourkfunk(k)
% Define your , R, phi1, phi2, theta1 and theta2 here...
delta=sqrt(((k(2)+k(3)+k(4))^2)4k(2)*k(4));
f = zeros(5,1);
f(1) = R  ((k(1)/k(2))*(1+k(3)/k(4)));
f(2) = phi1  (k(1)(theta1k(3)k(4))/delta);
f(3) = phi2  (k(1)(theta2k(3)k(4))/delta);
f(4) = theta1  ((k(2)+k(3)+k(4)+delta)/2);
f(5) = theta2  ((k(2)+k(3)+k(4)delta)/2);
end
