
68 Cal.App.2d 716 (1945)
ANNA M. BAER, Appellant,
v.
GEORGE M. SMITH et al., Respondents.
Civ. No. 7117. 
California Court of Appeals. Third Dist.  
Apr. 13, 1945.
 Roy Daily for Appellant.
 Henry S. Lyon, in pro. per., Robert W. Kenny, Attorney General, Ralph H. Cowing and Raymond McClure, Deputies Attorney General, Gerald M. Desmond and Stanley W. Reckers for Respondents.
 PEEK, J.
 This appeal is taken from the judgment entered in favor of the defendants upon the order of the trial court sustaining their demurrers to plaintiff's first amended complaint without leave to amend. By said complaint plaintiff sought to recover the aggregate sum of $111,050.48, alleged to be the amount of damages suffered by her by reason of alleged false imprisonment. The sole question before us is whether the facts alleged therein constitute a cause of action against any of the defendants.
 The complaint alleges that on October 7, 1938, the defendants caused plaintiff to be confined in the Stockton State Hospital on an alleged charge of insanity, and that she remained there to and including February 9, 1943; that prior to said confinement, defendant George M. Smith, as Sheriff of El Dorado County, placed her in a Placerville jail on September *719 21, 1938, without a warrant, order or process of any court; that on September 26, 1938, she was arraigned in the superior court of said county under an indictment for attempted arson (Pen. Code,  451a), and entered her plea of not guilty, and also not guilty by reason of insanity; that the court fixed Monday, October 10, 1938, as the time for the trial, and selected Margaret Smythe, Superintendent of the Stockton State Hospital, and Dr. E. M. Wilder, of Sacramento, as alienists, pursuant to section 1027 of the Penal Code; that before the trial date, to wit, on October 6, 1938, and while she was in custody, said sheriff signed an "Affidavit of Insanity" and served her with a "Warrant of Apprehension"; that pursuant thereto, on October 6, 1938, at 3 o'clock in the afternoon thereof, a hearing was had on said affidavit of insanity; that at the hearing Drs. A. A. McKinnon and W. A. Reckers signed a "Certificate of Medical Examiners ... without previously having made a physical, or other examination, or observation, of said plaintiff," and that they concluded she was insane.
 Appellant then alleged that the defendants Sheriff Smith, Margaret M. Smythe and District Attorney Henry S. Lyon testified at the hearing on the insanity charge, and thereafter the judge of the trial court signed a "Judgment of Insanity and Order of Commitment of Insane Person" and thereafter on October 7, 1938, appellant was taken to and confined within the Stockton State Hospital; that on October 7, 1938, on the same day that appellant was taken to the hospital, said district attorney appeared before the court and moved for a dismissal of the indictment on the ground of insufficiency of the evidence and upon the further ground that appellant was then permanently afflicted with a form of insanity known as paranoia.
 Lastly, it is alleged that she filed an action in the Superior Court of Sacramento County for the purpose of having it determined by a jury whether she was sane or insane, and that the jury returned a verdict that she was sane at the time of the trial; (the date of trial is not given, but an examination of the record reveals that it took place in 1943, nearly five years after her commitment to the State Hospital); that she "was at no time insane and that defendants, and each of them, well knew that plaintiff was not insane and did intentionally *720 and wilfully cause the detention of plaintiff among insane or alleged insane people in said institution as heretofore alleged without any cause or reason therefor and without any lawful or due process of law."
 [1] Plaintiff's first allegation is of no benefit to her in that it is not always necessary that a peace officer have a warrant or other process before taking a person into custody. Section 836 of the Penal Code authorizes such peace officer to make an arrest without a warrant for a public offense committed or attempted in his presence, or, where a person arrested has committed a felony, although not in his presence, or, when a felony has in fact been committed, and he has reasonable cause for believing the person arrested to have committed it. Plaintiff's allegation in this regard is further weakened by the fact that on the second day after she was taken into custody by the sheriff, the grand jury of El Dorado County indicted her on a charge of attempted arson.
 [2] The certificate of the doctors, in compliance with section 5053 of the Welfare and Institutions Code, recites that "we have attended before a Judge of said Court at the examination of Anna Baer, and have heard the testimony of all witnesses sworn and examined upon said hearing, and have made a personal examination of Anna Baer, and have testified under oath before the Court to the following facts, which were the result of the examination. ..." Said section as it read in 1938 provided as follows: "The judge shall compel the attendance of at least two medical examiners, who shall hear the testimony of all witnesses, make a personal examination of the alleged insane person, and testify before the judge as to the result of the examination, and to any other pertinent facts within their knowledge." It will thus be observed that appellant has alleged matters not contemplated or contained within said code section. There is nothing in the statute which requires a "physical" examination, nor is there any requirement as to "observation." Even statements by patients of present feelings and pain are included in the phrase "physical examination." (Western Union Telegraph Co. v. Morris, 10 Kan.App. 61 [61 P. 972, 973].) Under the circumstances plaintiff's allegations in this regard cannot constitute a cause of action against the doctors as they are immune from an action such as this. (145 A.L.R., note, p. 733.)
 [3] It is not claimed that the institution of the proceedings *721 was done in violation of any law, nor is there any allegation of malice on the part of the trial judge who adjudged the appellant insane after a hearing conducted in the manner prescribed by law. The judge's conclusions from the evidence are not the subject of an action for false imprisonment. Even though the trial judge had erred in his judgment, still there would be no ground for an action such as this. (Malone v. Carey, 17 Cal.App.2d 505, 507 [62 P.2d 166]; Platz v. Marion, 35 Cal.App. 241 [169 P. 697].) [4] Nor does the fact that the witnesses Smith, Smythe and Lyon testified at the hearing make them liable for false imprisonment; they gave their testimony and it was for the trial judge to determine whether the appellant was insane, and from the evidence he made his findings and entered judgment accordingly.
 [5] The allegation relative to the dismissal of the indictment by the district attorney is likewise without merit. Section 1385 of the Penal Code authorizes the district attorney, in furtherance of justice, to move the court for dismissal of the indictment, and, in fact, the court was empowered by that section to dismiss the indictment of its own motion.
 [6] The last allegations likewise fail to state a cause of action for the reason that it is conceded by appellant that she entered a plea of not guilty by reason of insanity to the indictment charging her with attempted arson. That plea is inconsistent with her allegation that she was at no time insane. Furthermore, if, as appellant alleged, she was at no time insane, she has barred herself by her failure to take advantage of section 5125 of the Welfare and Institutions Code, which then read:
 "If a person ordered to be committed, or any friend in his behalf, is dissatisfied with the order of the judge committing him, he may, within five days after the making of the order of commitment, demand that the question of his sanity be tried by a jury before the superior court of the county in which he was committed. Thereupon, the court shall cause a jury to be summoned and to be in attendance at a date stated, not less than five nor more than ten days from the date of the demand for a jury trial."
 Instead of demanding a trial by jury as above provided, the appellant waited nearly five years before making any complaint that she was unlawfully committed.
 [7a] The main contention made by appellant is that the *722 inquiry into her sanity should have been conducted in the manner and in conformance with the procedure outlined in sections 1026-1027 and/or sections 1367-1372, inclusive, of the Penal Code, and that the procedure taken under the Welfare and Institutions Code was in error. In other words, it is appellant's contention that the trial court was obliged to pursue the procedure outlined by said sections of the Penal Code and should not have invoked any provisions of the Welfare and Institutions Code. This claim is predicated upon the proposition that because appellant stood charged with a crime the court could not proceed to determine her mental condition under the Welfare and Institutions Code so long as the criminal charge was pending. Appellant has referred us to no authority supporting this contention, and admits "this is a case of 'first instance' asking this Court to differentiate between procedure under the Welfare Code and the Penal Code relative to insanity commitment."
 Section 1026 of the Penal Code authorizes a plea of not guilty by reason of insanity to be joined with another plea or pleas, such as a plea of not guilty, in which event he shall first be tried on his plea of not guilty, and upon conviction he shall be tried upon his plea of not guilty by reason of insanity. Section 1027 provides that when a defendant pleads not guilty by reason of insanity, the court must appoint two alienists to examine the defendant, investigate his sanity, and testify, whenever summoned, in any proceeding in which the sanity of the defendant is in question. Section 1026 provides for the trial of both pleas by the same jury. Section 1367 of the Penal Code provides that a person cannot be tried, adjudged to punishment, or punished for a public offense, while he is insane. Section 1368 provides that if at any time during the pendency of an action and prior to judgment a doubt arises as to the sanity of the defendant, the court must order the question as to his sanity to be determined by a trial by the court without a jury, or with a jury, if a trial by jury is demanded; and, from the time of such order, all proceedings in the criminal prosecution shall be suspended until the question of the sanity of the defendant has been determined. Sections 1369, 1370, 1371 and 1372 refer to procedural matters exclusively.
 It is to be noted that in the attempted arson case appellant entered the dual plea of not guilty and not guilty by reason *723 of insanity. [8] The plea of not guilty by reason of insanity was not a defense. In People v. Ellis, 206 Cal. 353, 357 [274 P. 353], the court said: "To denominate the plea of insanity a 'defense' to crime is not strictly accurate. More correctly it is a special plea to the effect that, assuming the homicide to have resulted from the act of the defendant, he is not amenable to punishment under the law." Despite appellant's allegation in her amended complaint that she was not insane at any time, it is conceded she entered a plea of not guilty by reason of insanity to the charge of attempted arson, which plea is entirely incompatible with the position she now takes. [7b] The attempted arson case was never called for trial, nor was anything done therein except to take the appellant's plea. As a result, the trial court had no opportunity of proceeding under the cited sections of the Penal Code. By her own conduct appellant forced the trial court to do exactly what was done and required to be done by said sections of the Penal Code, namely, the designation of alienists to examine her. We know of no law that inhibited the district attorney from dismissing the attempted arson charge before the date of the trial. [9] On the authority of People v. Perry, 14 Cal.2d 387 [94 P.2d 559, 124 A.L.R. 1123], and the cases therein cited, we hold that from a consideration of the language employed in section 1368 of the Penal Code it becomes obvious that the "doubt" as to the sanity of a defendant is one that must arise in the mind of the trial judge, rather than in the mind of counsel for the defendant or in that of any third person. [7c] In view of the fact that the trial judge had no opportunity to act under section 1368, and he being the only person to determine the question of "doubt" as to her sanity, appellant cannot now claim that the trial court pursued the wrong course. Appellant places great reliance upon the cases of People v. Superior Court of Contra Costa County, 4 Cal.2d 136 [47 P.2d 724], and Kellogg v. Cochran, 87 Cal. 192 [25 P. 677, 12 L.R.A. 104], in support of her contention that the procedure designated by the Penal Code was exclusive. The Kellogg case was decided upon the language of the demurrer interposed, and we conclude that it has no application here. We think the case of People v. Superior Court of Contra Costa County is opposed to, rather than supports appellant's argument. In that case it is expressly stated that after a person has been committed to an *724 insane asylum on a charge of insanity and received into the asylum, no court in this state is authorized to discharge him therefrom, or to restore him to the capacity of a sane person, under any circumstances, except upon a writ of habeas corpus. The power to discharge him otherwise than upon habeas corpus is vested exclusively in the officers of the asylum. The purpose of the procedure under the Welfare and Institutions Code is to protect the alleged mentally ill person by having him committed, thereby affecting his enjoyment of civil rights generally. The Penal Code does not undertake to deal with such subjects. It provides a summary procedure for the determination of the question as to whether the defendant is so far mentally affected as to prevent him from defending himself against the crime with which he is charged. A reading of the case last cited will reveal that the purposes contemplated by the procedure under the Penal Code are distinct from those under the Welfare and Institutions Code.
 [10] Had it been the intent of the Legislature to exclude persons charged with crime from the operations of the provisions of the Welfare and Institutions Code regarding the manner of commitment, such an intent could easily have been expressed by appropriate language. (See Thompson's Laws of New York, Mental Hygiene Law,  70, 74, 121.) It may be properly concluded that the Legislature intended that an insane person charged with a crime as well as any other insane person should be subject to the provisions of the Welfare and Institutions Code, both for the protection of the person, his property rights, and for the protection of the public. [7d] To the present situation has been added the further element that although at the outset the plaintiff was charged with a crime, that charge was dismissed, and all that was before the court was the proceeding under the Welfare and Institutions Code.
 In addition to the circumstances above related, the judgment itself recites that a certified copy of the order fixing the time for hearing on the insanity charge was duly served on Oliver, Hilda and Herbert Baer, relatives of the appellant residing in said El Dorado County, and the judgment further recites that during the hearing said relatives of appellant were sworn and examined as witnesses in regard to the mental condition of the appellant, her financial condition and that of persons liable for her care, support and maintenance. *725
 We conclude that the action taken by the trial court was authorized by law.
 The judgment is affirmed.
 Adams, P. J., and Thompson, J., concurred.
