
28 Cal.2d 671 (1946)
THE PEOPLE, Respondent,
v.
WILLIAM JOHN PHYLE, Appellant.
Crim. No. 4723. 
Supreme Court of California. In Bank.  
Aug. 6, 1946.
 Harry Bowman for Appellant.
 Robert W. Kenny, Attorney General, and Frank Richards, Deputy Attorney General, for Respondent.
 EDMONDS, J.
 Upon a plea of guilty, William J. Phyle was sentenced to be executed for the crime of murder of the first degree, and the judgment is before this court for review in accordance with the requirements of section 1239 of the Penal Code providing for an automatic appeal in every such case.
 Phyle was charged with the murder of Elmer E. Frazee. During the trial before a jury, Phyle withdrew his pleas of not guilty and not guilty by reason of insanity and pleaded guilty. The court then took evidence for the purpose of determining the degree of the crime and fixing the punishment to be imposed.
 [1] All of the circumstances in connection with the brutal and unprovoked murder of Frazee were freely admitted by Phyle in conversations with officers a few hours after his arrest and in an interview at the San Diego Police Station the next day, which was reduced to writing by a stenographer. He told the officers that he arrived in San Diego on the night of November 22d. He had no money and the next day, he went to a federal housing project with the intention of robbing the safe there. That night he slept in one of the trucks left on the grounds and in the morning made inquiries in regard to the habits of the employees. Frazee was a plumber regularly employed in the maintenance work of the buildings. During the morning he was in and out of the office where the safe was located but Phyle found out that he would leave about 3 o'clock in the afternoon.
 The exact time of the crime is not known. Phyle loitered around the project and, during the afternoon, entered the office. According to his account of the homicide, he stepped into the room and pulled out a .38- caliber revolver. He said nothing and neither did Frazee. Phyle "just let him have it," firing two shots. "I went out" said Phyle "to see if anybody heard the shots ... I ejected the two empty cartridges and put in a new one; that took about four minutes. Then I went back in and he wasn't dead yet." Frazee *673 "started moving around again. That's when he gave me the wallet," Phyle explained. "Of course, I got kind of a shock when he wasn't dead ... I went around in front of him, I think." The final act in the killing followed. Phyle put the gun against Frazee's head and shot him. Asked why the shot was fired. Phyle replied: "I lost my head the second time."
 Phyle then went to the lavatory, "washed up," and drove away in a truck owned by the federal government. He went to Solano Beach where he had a meal. At that time he found that there was only $1.25 in Frazee's wallet. Phyle next drove to Escondido to get off the main highway. His intention, he said, was to "dump the car and hide it out, and then take out from there to pull what I could." Early in the following morning, Escondido police officers saw the truck, which had been reported as stolen, and arrested Phyle. In the truck they found a revolver, fully loaded, a wrecking bar, a pipe wrench and Frazee's wallet.
 Frazee's body was found at 5 o'clock in the afternoon, probably about two hours after the homicide. In the opinion of the coroner who performed the autopsy, the two bullet wounds in Frazee's body would not necessarily have caused death; the shot in the head was the fatal one.
 The defendant is 32 years of age. At the age of 15 he enlisted in the United States Navy, serving from 1929 to 1931 when he received an honorable discharge. His criminal record commenced in 1931 when he was arrested upon suspicion of having committed a burglary. Many arrests followed; by his own count he has been arrested 35 times. He first was convicted in 1935 when he was sentenced to 90 days in the county jail at San Luis Obispo, California. In 1940 he was sent to McNeil's Island to serve a year and a day following his conviction in the federal court upon a charge of violating the Dyer Act. After being conditionally released he was twice placed in the federal correctional institution at Terminal Island for violation of parole. In 1943, while in the army, he was sentenced to the State Prison of Colorado for grand larceny and the theft of a motor vehicle. He served 14 months upon that conviction.
 Two physicians appointed by the court to examine Phyle each testified that, in his opinion, at the time of the commission of the crime, the defendant was sane. One of them stated that Phyle knows the difference between right and wrong, but *674 dos not agree with society's concepts in that regard and refuses to cooperate with authority.
 No briefs have been filed in this court but the entire transcript of the proceedings has been carefully read. It shows that upon the request of the defendant made at the time of his arraignment, the court appointed counsel to represent him. This assignment was fulfilled with fidelity and proficiency. When Phyle informed his attorney that he desired to change his plea, the trial judge examined the defendant at length as to whether he had been fully informed as to his legal rights. Phyle stated that his action was entirely voluntary and he personally withdrew his former pleas and pleaded guilty to the charge of murder. This intention, it appears, was not formed at the moment. Almost two months before, in a letter which Phyle wrote to his mother while he was in the county jail, he said that he would "probably plead guilty." In regard to the crime, he wrote: "There isn't much more to say except that the robbery wasn't for $1.25. There was a safe in that office. But him hanging around there botched it up. I hope he's satisfied now. I now the publicity is tough on you, but after all, look what I've got coming in the very near future. No, I am not sorry for what I did. I just regret that I didn't empty the whole gun in him."
 After the change of plea, Phyle's counsel cross-examined the witnesses who testified as to the circumstances of the homicide and continued to represent the defendant until he was sentenced. When arraigned for judgment, the defendant stated that he knew of no legal cause why it should not be pronounced and he acknowledged the prior convictions. Asked by the trial judge if he had anything to say, Phyle replied: "Not a thing." There is nothing in the record to suggest that the police officers took any advantage of him when he was interviewed in regard to the crime. Phyle has not challenged any of the statements attributed to him by them, and the stenographic report of the questioning shows that he told his story voluntarily and apparently with complete truthfulness.
 One who causes the death of another while engaged in the perpetration of, or attempt to perpetrate, the crime of robbery is guilty of murder in the first degree. (Pen. Code,  189.) The punishment to be imposed upon one who pleads guilty to that offense is a matter exclusively within the discretion of the trial court. (People v. Hawk, 17 Cal.2d 812 [112 P.2d 225].) Undoubtedly one factor which influenced a determination *675 that the death penalty should be imposed upon Phyle was the testimony of one of the examining physicians that Phyle is a person whose manner of thinking makes him dangerous to society. All of the evidence points to that conclusion.
 The judgment is affirmed.
 Gibson, C.J., Shenk, J., Carter, J., Traynor, J., Schauer, J., and Spence, J., concurred.
