When dimensions of the flow domain become small, such as in the micro-electro-mechanical systems (MEMS) and nano-electro-mechanical systems (NEMS), rarefaction effects become more prominent. Flows that we consider are in the continuum and rarefied gas flow regimes. We provide analytical solutions for compressible nonisothermal flows between parallel plates, with different temperatures. Comparison of results between our analytical solutions and commercial CFD code Ansys Fluent is performed. We analyze four cases with constant and variable transport coefficients in both continuum and rarefied gas flow regimes. The analysis reveals that very good agreement is present in the continuum flow regime, as well as in the slip flow regime. This outcome not only validates the present study but also opens up opportunities to investigate cases where analytical solutions are unobtainable.