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


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