LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 230
Default Extracting Terms from simple linear equation

I have a basic linear equation of this form (Note, parentheses and grouped
terms will not matter):

-25 + 3*X + 15*Y - 4*X^2 + 8*X^2*Y^-2

Note: never this form -25 + 3*X + 15*Y - 4*X^2 (1 - 2 Y^-2)

Can someone please help me build a parsing routine to isolate terms, and
whether they are preceded by a + or a -. I am using two separate arrays
because I later have to work with each term to calculate a derivative.
Negative exponent must be treated differently than a minus sign. ArrTerms
and ArrOps() should look like this at the end of the above exercise, and be
generalizable:

i ArrTerms( i ) ArrOps( i )
1 25 -
2 3*X +
3 15*Y +
4 4*X^2 -
5 8*X^2*Y^-2 +

I'd be very appreciative for help with the required (generalizable) routine.
If I can clarify something, please e-mail me (w b e n s o n 1 @ n y c a p .
r r . c o m) or post here.

Thanks!


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting Terms and Exponents of a Text Poly Formula ?? monir Excel Worksheet Functions 4 September 28th 09 04:21 PM
Charting a linear equation Joseph L. Casale Charts and Charting in Excel 2 April 27th 07 07:45 PM
solving of linear equation Stan Excel Discussion (Misc queries) 5 August 30th 06 03:12 PM
Linear Predictive Equation Linda Excel Worksheet Functions 3 June 23rd 06 03:05 AM
Adding a simple linear equation wjsubs[_2_] Excel Programming 1 June 30th 04 08:31 AM


All times are GMT +1. The time now is 11:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"