Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: How to solve for system of equation with set of known variables?
Date: Mon, 15 Nov 2010 00:47:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 21
Message-ID: <ibpvu7$iot$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1289782023 19229 172.30.248.37 (15 Nov 2010 00:47:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 15 Nov 2010 00:47:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2612929
Xref: news.mathworks.com comp.soft-sys.matlab:686790

Hello all, I am a self-taught programmer and I am having a problem with the following:

So I need to solve for 2 variables, I have 2 equations. Easy enough... but:

In each of the 2 equations i have another 2 variables which I know and have a large list of. I need some sort of code to solve the system of equations for the two unknown variables for the entire list of known variables (like a loop statement)

my equations:

RH=sqrt(4*z^2+1)-2*z;
RV=1/sqrt(4*z^2+1);
VD=c*(1-RV)
HD=c*(1-RH) 

I have vectors for both VD and HD (my known variables)

How do i cycle through solutions for z,c for each pair of VD HD ?

I can solve for any specific VD,HD pair using the solve function or fsolve but I do not know how to include a loop statement in this in order to solve for the full list of VD and HD vectors.

Any help would be appreciated.
---