When I heard the learn'd astronomer,
When the proofs, the figures, were ranged in columns before me,
When I was shown the charts and diagrams, to add, divide, and measure them,
When I sitting heard the astronomer where he lectured with much
applause in the lecture-room,
How soon unaccountable I became tired and sick,
Till rising and gliding out I wander'd off by myself,
In the mystical moist night-air, and from time to time,
Look'd up in perfect silence at the stars.
Whitman suddenly feels bored with being stuck in the lecture room. His diction here is key. He is not disappointed that he cannot comprehend the astronomer. Instead, he is saying that he would simply rather experience it for himself. Whitman’s use of the word “unaccountable,” meaning something inexplicable, provides a contrast to the first half of the poem, which was characterized by explanation and concreteness. 
 Interestingly enough, it would seem that Whitman was opposed to education and school. In reality,  Whitman was actually a teacher for a part of his life.  Whitman’s poems suggest the idea that formal teaching can only go so far and experiences are where you truly learn. 

When I Heard the Learnd Astronomer