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$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1289782023 19229 (15 Nov 2010 00:47:03 GMT)
NNTP-Posting-Date: Mon, 15 Nov 2010 00:47:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2612929
Xref: 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:


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.