zerodeviation.net - musings of an engineer, developer, and picky theologian

Archive for April, 2009

Theology

April 24, 2009

Not just doing, but attitude

Tags: , , ,

I am reading in 1 Chronicles right now and just finished the last chapter. David’s prayer in 1 Chronicles 29:10ff reminded me of Jesus’ Sermon on the Mount, where he raised the bar from simply doing to the intentions of the heart. Don’t just not commit adultery, don’t lust in your heart, either. Don’t just not murder, but don’t be angry with your brother, either.

Of course this wasn’t a new concept in the NT, it was supposed to have been like that all along, even under the Law, and the passage in Chronicles makes that clear. Starting in v.17 (emphasize mine):

17 Since I know, O my God, that You try the heart and delight in uprightness, I, in the integrity of my heart, have willingly offered all these things; so now with joy I have seen Your people, who are present here, make their offerings willingly to You. 18 O Lord , the God of Abraham, Isaac and Israel, our fathers, preserve this forever in the intentions of the heart of Your people, and direct their heart to You;19 and give to my son Solomon a perfect heart to keep Your commandments, Your testimonies and Your statutes, and to do them all, and to build the temple, for which I have made provision.

Notice the focus on the heart, and deeds coming from it. Especially in v19, David asks God to give his son a perfect heart to keep God’s commandments, or in other words, in order that he would keep God’s commandments. Of course God judges our actions, but He also judges our intentions and thoughts.

If you’re not a Christian, how would you stand up to a test like that?

Politics

April 8, 2009

Poll oddities

Tags:

It seems like over 61% of Americans feel like this country is headed in the wrong direction, but at the same time, 60% approve of Obama’s performance.

I realize that Obama isn’t the only one running this country, but it appears to me that he has the most influence on what’s happening right now and what will happen in the future. I don’t believe the majority of people spend too much time thinking…

Engineering

April 2, 2009

Matlab Goodness for System Analysis

Tags: , ,

This is mostly for my own reference, but I hope someone else will benefit from it. It’s mainly to play with transfer functions.

First, generate the transfer function:

% numerator coefficients for s^2 + 2s + 4
num = [1 2 4]
% denominator coefficients for s + 6
den = [ 1 6 ]
% build the transfer function
H = tf(num, den)
% now we can do fun stuff like get a bode plot
bode(H)
% or plot it over a range of frequencies, 100 to 200 radians/s
bode(H,{100,200})
% or we could get the gain and phase shift for a certain frequency, 4pi here
[gain, phase] = bode(H, 4pi)
% how about zeroes and poles? Okay...
tzero(H)
poles(H)
To add some more stuff, the transfer function can also be generated when you have the factored form of it to begin with:
% if the denominator looks like (s-1)(s-2)(s-3)
poles = [1 2 3]
% same for zeros: (s+1)(s+2)(s+3)
zeros = [-1 -2 -3]
% and finally, gain K
k = 1
% now we can get the system like so:
H = zpk(zeros, poles, k)
I may add more at a later point. Not too fancy stuff here, but pretty helpful to what I needed done.