Tuesday, April 2, 2013

Good posture is bad for your gas mileage

It's true, especially if you ride a scooter. I have a scooter that I ride to work when it's not too cold (when it's 50 degrees, in stupid units, outside and you're riding on a scooter at 25-30 mph it feels like it's about 20 degrees-again, in stupid units) and I love it, for the most part. True, my lawn mower has more horsepower than my scooter, and going uphill is a bit of a challenge, but you can't really beat 100 miles/gallon and mostly free parking in most places here. If I want to get really good gas mileage though, I have to hunch myself forward on my scooter and try to make myself more aerodynamic. If I sit up straight, like I've been taught since I was a kid, it will not only make me go slower, but it also kills my gas mileage and I only get about 90 miles/gallon. I know, I know, that's still pretty good, but it just goes to show that what they teach you as a child isn't always correct...all the time.

I GOT IT WORKING!!!!!!!

For those who read these short blurbs, thank you first of all (I'm a bit surprised people look at this, honestly, so seriously, thank you), and secondly, you'll know what I'm talking about (maybe).

It came down to units and then to using a numerically stable algorithm to diagonalize the matrix, otherwise I was getting complex eigenvalues, which was a bad thing for what I am testing this on. It amazes me how two algorithms, which in the end are supposed to give you the exact same solutions, and which to the unlearned computer science person (i.e., me) don't really appear to have any significant differences. The timings are about the same, they both put the matrix into the same form before diagonalizing it, etc. etc. etc. But there are some huge differences when you compare the results. The first, which is not numerically stable, can give large variations in the results just from small changes in the input, and when you're doing something like numerical differentiation, there's always going to be small variations in the inputs you give the program. A lesson learned...and probably forgotten before I get to something like this again.

No comments:

Post a Comment