## Monday, March 27, 2017

### How to Do a Cross Product in Excel 2

Working with arrays of numbers in Excel can be a little difficult especially if one is doing cross products. But we can input the formulas for something familiar and then rearrange the cells to get the relative positions correct for the array.

### How to Do a Cross Product in Excel

I found a screen recording tool in PowerPoint 2016 today and decided to test it with a video showing how to do a cross product in Excel 2016. One first enters two vectors in adjacent columns. If one copies the first two rows underneath the original two vectors one can use drag and fill to copy the formula for the first component of the cross product in the third column. Setting the two rows at the bottom equal to the first two rows at the top allows the procedure to work even if the numbers are changed.

Hiding the 4th and 5th rows makes it easier to view the results.

## Wednesday, March 22, 2017

### Differences In Times Between Equinoxes

I recomputed the times for the Spring Equinox using JPL's HORIZONS Web-Interface for the years 2010-2020 and got similar results to those for MICA for the same period. The times were all shifted by a few hours and the mean value for the period differed slightly but the plot was similar overall.

I couldn't find an explanation for magnitude of the deviations. The changes in the Earth's orientation due to nutation are of the order of a few seconds of arc. The effects of gavitational perturbations accelerate and retard the Earth in its orbit about the Sun and can produce cummulative changes.

## Tuesday, March 21, 2017

### Deviation in Time Between Equinoxes 1800-2050

I recomputed the deviations for the time between Spring Equinoxes using MICA data from 1800 to 2050 which was all that was available.

The data appears to be fairly random but there may be a beat frequency present since the data shows very little variation about 1820 and 1990. The mean value was 365.242358 days.

## Monday, March 20, 2017

### Spring Is Here

The Spring Equinox occurred at 10:28 UT today and the table in the Wikipedia article for the time of day that the Sun crosses the equator appears to range throughout but this is somewhat deceiving since the time between Equinoxes differs slightly from the time it takes for the Earth to complete its orbit. It's the reason we have leap years. If one looks at the deviations from the mean time of the Equinox the variation appears to be less that 10 minutes for the decade or about 1 part in 52,595. Most of this variation is probably due to the perturbing influence of the position of the Moon.

There is also a slow change in the position that the Celestial Equator crosses the Ecliptic due to the Earth's Axial Precession which in turn is due to gravitational torques of the Moon, Sun and other planetary bodies acting on the Earth's equatorial bulge.

Maia was an ancient fertility goddess who appears to have been associated with the growth and renewal of springtime. In ancient Greek maia meant lady but she was also known as a midwife. It may not be a coincidence that in poetry she is associated with magic and enchantment considering the similarity of the Greek word for magic,  She is definitely beguiling.

Supplemental (Mar 21): The product of a little free association this morning:

## Thursday, March 16, 2017

### Functions That Act Like Bots

Uncritical thinking can get us into trouble. If we place too much trust in the group and take every suggestion seriously we can be induced to act improperly. We can't ignore individual responsibility and slave our actions to the will of others.

The same is true with computer systems. Every computer has a bag of tricks and hackers will try to take advantage of them if they can get away with it. Added security might be achieved if we can limit actions to a known set of instructions. The programs may have to become more like automatons that act cooperatively with assigned tasks and notify others of the problems they encounter.

If things do not go as planned a programmer will have to take remedial action.

This is why I designed the imround function to be selective in its actions. Sometimes it may be useful to pass on error messages to bring them to the attention of the programmer. To others error messages may be a distraction so I decided to add a variable to imround to allow it to change its behavior as needed.

If copy is true, this version of imround will just copy the contents of the source cell if it doesn't modify it. When copy is false, the contents are not passed on.

Sometimes we have to act to maintain order and limit the propagation of error.

## Wednesday, March 15, 2017

### slideshow test

The slideshow above came from a google html/css gadget originally posted on the side panel and moved into the blog column. The code was a slight modification of the code found on the W3.CSS Slideshow page. The code from the gadget was copied as HTML/CSS into this post. For some reason there is now a vertical shift and a lot of "space." Blogger seems to have altered some of the code.

Supplemental (Mar 15): Found the bug. There were some spurious <br> 's in the html code for the blog so I placed the entire <div> code for the container on one line. Removed the vertical shift.

### Using the Excel Watch Window

Excel's Watch Window is a useful tool for monitoring the contents of a range of cells. It's found on the Formula tab. One can add a range of cells in a column by them and using the Add Watch... button.

Entering a formula in the first cell provides the model for those below using drag and fill. Here the source cells are found in column B.

The drag and fill uses the same formula and relative location of the source cell.

It's not as easy to remove a cell from the Watch Window since each entry has to be deleted individually. The best solution appears to be not to save a worksheet with a watch window.

## Tuesday, March 14, 2017

### Replacement of the Imround Macro With a User Function

I made some minor changes imround macro and it is now a user function that gives the same results.

It works with Excel's drag and fill method and the Undo button now works.

I started working with a macro since it provided some code that gave an idea of what could be done in Excel. I was interested in the extent to which one could modify a macro at the time. It is easier to pass variables in a function.

## Thursday, March 2, 2017

### More on Optimizing Testing Times

The derivation of the formula for the expected processing times for a sequence of tests that have to be passed before an action is performed is shown below as well as a few simple examples to illustrate the calculations.

The expected processing times appear to favor the more probable cases being tested first even though they take longer but this may not always be true.

A dedicated processor would only have to check for the task it was intended to handle so if we ignore waiting times and there was one queue for each test case the expected processing time would be the the expected time defined by ΣpkTk.

When waiting times become unexpectedly large more processors might be called for to improve efficiency. Letting people decide for themselves what line to get into could help improve processing time. If troublesome cases get into the wrong line a special processing queue might be set up so they can be redirected there. A directory mechanism could be as simple as a sign or maybe an app for unusual situations.

Edit (Mar 2): Added dedicated server processing times for the examples and did a little cleanup.

Supplemental (Mar 2): Testing and tasking both take time and the multiplier formula for sequential actions above applies to general purpose servers dealing with queues or streams requesting actions. Sometimes a referral is the best response. When no action is required it may be best to decline a request.