Daily Download 29: Using VBA – linking to C

The final few days of the daily download series will be dealing with the use of VBA, starting with linking to C (and C++).  This was covered in:

Linking Excel to C
Linking Excel to C – 2
Linking Excel to C – 3; Avoiding bottlenecks

The download files are:

http://interactiveds.com.au/software/WalkThrough2.zip
http://interactiveds.com.au/software/Cubicdll.zip

Benchmark of cubic solution routines

Posted in Computing - general, Excel, Link to dll, UDFs, VBA | Tagged , , , , | Leave a comment

Daily Download 28: The Hole Through the Middle of the Earth, using ODE solvers, and Three Blokes

Today’s download is based on a series of posts on the “hole through the middle of the Earth”, which by devious means has been tied in with the solution of differential equations, buckling of columns, and a story by Bill Baily about when not to offer to buy the first round.

Elegant solutions, Simple Harmonic Motion, and the hole through the middle of the Earth
Elegant solutions, Column buckling, and the hole through the middle of the Earth
More on buckling columns
The hole through the middle of the Earth – acceleration
The hole through the middle of the Earth – revised transit time 
The hole through the middle of the Earth – moved to the Equator
Three blokes go into a pub …
The hole through the middle of the Earth – filled with air

… and for anyone making it to the end and wondering where the next episode is, it hasn’t been written yet.

Here are the download files:

http://interactiveds.com.au/software/Earth%20Density.xls
http://interactiveds.com.au/software/ODESolver-Buckle.zip

And the “three blokes” joke:

Three blokes go into a bar

Posted in Beam Bending, Excel, Maths, Newton, UDFs, VBA | Tagged , , , , , | Leave a comment

Daily Download 27: Miscellaneous

Just some bits and pieces that don’t really fit in anywhere else today:

Get your spreadsheet to talk to you at: Newton Excel Shakespeare
Download: http://www.interactiveds.com.au/software/Text2Speech.xlsb

Anniversaries gives you the tools to avoid missing significant anniversaries (and also to find the value of phi).
Download: http://interactiveds.com.au/software/Anniversaries.zip

Geometry for Joiners provides a spreadsheet solution to a geometric calculation that may or may not be very useful to joiners.
Download: http://www.interactiveds.com.au/software/FrameBrace.xlsb

Finally my annual statistics summary gives a list of all the posts here that other people have thought to be worth looking at:
http://interactiveds.com.au/software/Stats-year1.xls
http://interactiveds.com.au/software/Stats-year2.xls
http://interactiveds.com.au/software/Stats-year3.xls
http://interactiveds.com.au/software/Stats-year4.xls

Posted in Computing - general, Excel | Tagged , , , | Leave a comment

Daily Download 26: Moving averages and prime numbers

Today’s downloads are the last of the maths related functions:

http://interactiveds.com.au/software/MovAv.zip provides a User Defined Function (UDF) to return the moving average of a set of data, and

http://www.interactiveds.com.au/software/Primes.zip is a UDF to either generate a set of prime numbers between specified limits, or check if a given number is prime or not.

For more details see:

Moving Average Function

MovAv Function

Finding Prime Numbers with Excel, and using Array Formulas

Prime Function

Posted in Excel, Maths, Newton, UDFs, VBA | Tagged , , , , | 1 Comment

Daily Download 25: Vector Functions

Today’s download file provides a variety of vector arithmetic functions, which can be used either from other VBA routines, or on the spreadsheet as User Defined Functions.

Download file:
http://interactiveds.com.au/software/VectorFunc.xlsb

In addition to Dot and Cross the spreadsheet contains the following vector related functions (optional function arguments are shown in italics):

  • Length(Vect1, Vect2) returns the length of a vector from the origin if only Vect1 is specified, or the length between Vect1 and Vect2 if both are specified.
  • isLeft(P1, P2, P3) tests if P3 is left or Right of the line through P1 and P2. The magnitude of the return value is also twice the area of the triangle specified by P1, P2, P3. Note that isLeft cannot be called as a UDF.
  • Orientation2D_Triangle(P1, P2, P3) calls isLeft, and returns the same value. It may be called as a UDF.
  • Area2D_Triangle(P1, P2, P3) calls Orientation2D_Triangle, and divides the result by -2, returning the area of the triangle P1P2P3, with a positive area when the points are specified in a clockwise direction.
  • Area2D(Pointrange) returns the area of a 2D polygon with any number of points. The points are assumed to be arranged in a range of n rows x 2 columns (X and Y values), with the last point being the same as the first.
  • Area3D(Pointrange) returns the area of a 3D polygon in a plane with any number of points. The points are assumed to be arranged in a range of n rows x 3 columns (X, Y and Z values), with the last point being the same as the first. If the points are not on a common plane it will return the area of the polygon projected onto the plane defined by the first three points.
  • UnitNorm(Pointrange) returns the unit normal to a plane specified by the 3D points in Pointrange. The points are assumed to be arranged in a range of n rows x 3 columns (X, Y and Z values)

More details at: Dots and Crosses

Vector product functions

3D cross product and length

Posted in Excel, Maths, Newton, UDFs, VBA | Tagged , , , , , , | Leave a comment