View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
monir monir is offline
external usenet poster
 
Posts: 215
Default UDF: Roots of 1D Polynomials of Degree N and Real or Complex C

Graeme;

I've just emailed you a copy of my demo w/b (XL 2007).
Please acknowledge receipt.

Regards.


"Graeme" wrote:

Hi monir,

1. I don't know how to attach files, or if it can be done, and I could not
find the answer in the Help.
2. Re the code: I'm interested mainly in the VBA code from an algorithmic
perspective, but having the procedure to run some tests and demos would be
most useful (private research purposes only).
3. Excel 2007.
4. my email address is gdennes_at_hotmail_dot_com Let me know if this is
not clear!!

Thank you for offering to make it available.

Graeme

---------------------------

"monir" wrote:

Graeme;

I'd be glad to post a copy of my self-contained demo w/b with the VBA
procedure.

1) I'm not sure if I could post the w/b as an Attachment in this MS DG. Do
you know how ??
If this posting feature is not available, please mail me your work email
address.
2) Are you interested in accessing the VBA code or in the use of the
procedure ??
3) Which version of Excel are you running ??
I've a demo version for XL 2007 and another for XL 2003 (and possibly
earlier). There're slight differences in the developed VBA code.

Regards.


"Graeme Dennes" wrote:


I would be pleased to see the code for the VBA procedure you've developed,
along with the demo. I'm sure others would too.

Graeme

----------------

"monir" wrote:

Hello;

1) I've ironed out ALL the problems with the VBA procedure .... at last!
In addition to accessing the VBA atpvbaen.xls library (as per Dana DeLouis'
suggestion), I've also replaced the input array argument in the array
Function Zroots2() from a 2D array to two 1D arrays.

2) The VBA procedure now works perfectly and as desired. I've successfully
tested the procedure on numerous 1D polynomials for up to degree 20 with real
and complex coefficients. ALL real and complex roots are determined
correctly with almost no effort from the user. Just enter the deg of the
poly and the poly coeffs on a w/s.
(The max poly deg of 20 is only for ease formatting of the w/s. The VBA
works fine for any 1D poly of any deg.)

If there's interest, please let me know and I'd be glad to post the VBA
procedure with a demo.

Thank you all for your help in resolving the issue.

Kind regards.


"Peter T" wrote:

"SteveM" wrote in message
news:e3e3f6a6-5758-4806-8c64-
A VBA function only returns a single value. But you are trying to
return an array.

Indeed a UDF can return a array to cells

Select a similar size array of cells, with the formula in the input bar
Array enter with Ctrl-shift-Enter

Regards,
Peter T