
173 Cal.App.3d 1113 (1985)
219 Cal. Rptr. 225
THE PEOPLE, Plaintiff and Respondent,
v.
LEMUEL BEARD, Defendant and Appellant.
Docket No. B005767.
Court of Appeals of California, Second District, Division One.
October 7, 1985.
*1115 COUNSEL
Brian David Cochran, under appointment by the Court of Appeal, for Defendant and Appellant.
John K. Van de Kamp, Attorney General, Gary R. Hahn and Patra Woolum, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
LUCAS, J. 

INTRODUCTION
Lemuel Beard (Beard) appeals from a judgment entered after a jury trial in which his original commitment to a state hospital under the terms of Penal *1116 Code section 1026[1] was extended by two years under the terms of section 1026.5, subdivision (b). We affirm.

FACTS AND PROCEEDINGS
Beard was prosecuted for assault with a deadly weapon, found not guilty by reason of insanity under the terms of section 1026, and committed to a state hospital. Beard's maximum term of commitment under the terms of section 1026.5, subdivision (a) was due to expire on June 16, 1984, subject to any petition for extension the district attorney might file under the terms of section 1026.5, subdivision (b).
During his term of commitment at Patton State Hospital, Beard was hardly a model patient. Beard walked around the premises with his fists clenched and his arms held in an aggressive stance. On more than one occasion Beard verbally threatened counselors on duty without any provocation. On more than one occasion Beard wandered naked in the hospital and waved his penis threateningly at female staffers. Several times staff members and patients found Beard masturbating in public places. Beard refused to cooperate in group therapy, which he referred to as "bullshit." "I am just here to do time," Beard belligerently told counselors. In January of 1984, Beard suddenly grabbed the crotch of a woman staff member who happened to be walking down the hallway and passed him. On January 5, 1984, and on January 18, 1984, Beard physically attacked other patients without provocation. On January 5, 1984, Beard suddenly punched and knocked over psychiatric technician, Vincent Dorsey, without any provocation or warning. Beard told more than one hospital staff member that he heard voices which told him to engage in the behavior described above.
On March 16, 1984, the district attorney filed a petition for extended commitment of Beard under section 1026.5, subdivision (b). On March 22, 1984, Beard was sent to the county jail to await trial on the petition. On May 3, 1984, while waiting for transportation from the court to the county jail, Beard attacked and injured a 64-year-old fellow inmate, both of whose hands were handcuffed together, without any warning or provocation.
Pursuant to the terms of section 1026.5, subdivision (b), the court appointed two psychiatrists, Dr. Alvin Davis and Dr. Ronald Markman, to study Beard's medical records and interview Beard to determine whether Beard presented a substantial danger of physical harm to others. Beard objected to the court-ordered examinations on grounds of his privilege against self-incrimination, right to effective assistance of counsel, and right to privacy. *1117 The court overruled Beard's objections and ordered Beard to answer the psychiatrists' questions. Dr. Davis interviewed Beard, but Beard walked out early in Dr. Markman's interview. Both of these psychiatrists testified at the trial, along with a psychologist and a psychiatrist who treated Beard at Patton State Hospital.[2]
Pursuant to the terms of section 1026.5, subdivision (b), a jury trial was held on the petition from May 6, 1984 through May 24, 1984. The jury unanimously found that Beard "has a mental disease, defect, or disorder" and "by reason of such mental condition represents a substantial danger of physical harm to others." The court entered judgment upon the verdict and extended Beard's term of commitment to Patton State Hospital by two years, commencing June 16, 1984. Beard filed a timely notice of appeal.

DISCUSSION
Beard raises three overlapping issues on appeal. He contends that the evidence was insufficient to sustain the jury's finding of continued dangerousness and that the court-ordered psychiatric examinations violated his privilege against self-incrimination and his right to effective assistance of counsel. We will address each of these issues in turn.

1. Sufficiency of Evidence to Support Extension of Commitment

(1) Section 1026.5, subdivision (b)(1) authorizes extension of commitments under section 1026 for two-year intervals when, because of a mental disease, defect, or disorder the inmate represents a substantial danger of physical harm to others. (People v. Buttes (1982) 134 Cal. App.3d 116, 125 [184 Cal. Rptr. 497]; CALJIC No. 4.17 (4th ed. 1985 pocket pt.) p. 45.)
The evidence adduced at trial was that Beard physically assaulted a hospital worker and fellow patients on separate occasions. A psychiatric technician testified that she saw Beard grab a coworker's crotch in the hallway. Several staff members testified that Beard walked about in a tense, hostile posture with clenched fists and made numerous verbal threats to staff members. Beard repeatedly flouted hospital rules. Hospital staff members observed that Beard tended to wander the halls at night, did not attend group therapy, or cooperate with therapists, and masturbated in public. Beard said that he heard voices that told him to engage in this aberrational behavior. A bailiff testified that, while in a holding cell awaiting transport from court *1118 to jail on May 3, 1984, Beard struck and injured an elderly inmate without any apparent provocation. Patton State Hospital staff psychiatrist Rosenthal and staff psychologist Kania both expressed the opinion, based upon their observations of Beard during his commitment at Patton, that Beard was likely to cause physical harm to others if released from the hospital. Dr. Davis and Dr. Markman, the court-appointed psychiatrists, concurred with the assessment of the hospital staff psychologist and psychiatrist.
The purpose of the proceeding to extend a commitment under section 1026.5, subdivision (b) is to protect the public from dangerously insane persons. (2a) One single recent act of violence unrelated to the act which was the basis for the original commitment, or a psychiatric opinion may constitute sufficient evidence to support a finding under section 1026.5, subdivision (b)(1) that the patient represents a substantial danger of physical harm to others by reason of mental illness, defect or disorder. (People v. Echols (1982) 138 Cal. App.3d 838, 843 [188 Cal. Rptr. 328] (single act of violence); People v. Bennett (1982) 131 Cal. App.3d 488, 496-497 [182 Cal. Rptr. 473] (opinion of mental health professional).)
As the recital of facts demonstrates, several recent incidents of unprovoked violence on the part of Beard were shown at trial, and several psychologists and psychiatrists testified that Beard, in their opinions, represents a substantial danger of physical harm to others and should not be released from the hospital. We will not reweigh the credibility of the evidence adduced at trial. (3) Our function as an appellate court is merely to determine whether substantial evidence in the record could support a reasonable trier of fact in finding beyond a reasonable doubt that Beard poses a substantial danger of physical harm to others by reason of a mental illness, defect, or disorder. (See People v. Mapp (1983) 150 Cal. App.3d 346, 352-353 [198 Cal. Rptr. 177].) (2b) As the record discloses substantial evidence to support the decision of the trier of fact, both by way of eyewitness accounts of Beard's acts and expert opinion, we will not disturb the determination of the trier of fact on this issue.

2. Privilege Against Self-incrimination

(4) Beard argues that the court-ordered examinations by Dr. Davis and Dr. Markman violated his privilege against self-incrimination under the state and federal Constitutions. (U.S. Const., Amend. 5; Cal. Const., art. I, § 15.) We disagree.
Although the rules of criminal discovery apply in proceedings of this nature (Pen. Code, § 1026.5, subd. (b)(3)), the proceeding is essentially civil in nature, because it is directed to the treatment of the patient's illness, *1119 not punishment. (Cf. Cramer v. Tyars (1979) 23 Cal.3d 131, 138-139 [151 Cal. Rptr. 653, 588 P.2d 793]; People v. Poggi (1980) 107 Cal. App.3d 581, 586 [165 Cal. Rptr. 758].) Questions relating to Beard's mental condition do not on their face seek to elicit information which may tend to subject Beard to criminal prosecution. (Conservatorship of Mitchell (1981) 114 Cal. App.3d 606, 611-612 [170 Cal. Rptr. 759].) In fact, such an examination is required by the terms of section 1026.5, and psychiatric evaluation is often essential evidence on the issue of dangerousness. (See People v. Bennett (1982) 131 Cal. App.3d 488, 497 [182 Cal. Rptr. 473].)
The record does not show that the court refused to permit Beard's attorney to attend the psychiatric examinations nor does it show that Beard's attorney made any effort to attend those examinations. Before their interviews began, Dr. Davis and Dr. Markman each informed Beard of the nature of the interview and told Beard that he need not respond to questions he found objectionable, and Beard exercised that option amply in the interview with Dr. Markman. There is no indication on the record, however, that any questions posed by Dr. Markman or by Dr. Davis sought to elicit any information that could even remotely subject Beard to criminal prosecution. "The central standard for the privilege's application has been whether the claimant is confronted by substantial and `real,' and not merely trifling or imaginary hazards or incrimination." (Marchetti v. United States (1968) 390 U.S. 39, 53 [19 L.Ed.2d 889, 901, 88 S.Ct. 697]; accord United States v. Freed (1971) 401 U.S. 601, 606-607 [28 L.Ed.2d 356, 361, 91 S.Ct. 1112].) Beard has failed to make any showing on the basis of the record that his privilege against self-incrimination has in any way been violated by the court-ordered psychiatric examinations. (Conservatorship of Mitchell (1981) 114 Cal. App.3d 606, 611-612 [170 Cal. Rptr. 759].)

3. Right to Effective Assistance of Counsel

(5) Beard argues that the court's appointment of two psychiatrists to examine Beard deprived Beard of his right to effective assistance of counsel under the state and federal Constitutions. (U.S. Const., Amend. 6; Cal. Const., art. I, § 15.) We disagree.
Beard contends, without citing to the record, that his attorney could not be present at the psychiatric examinations, and that the examinations were the equivalent of in-custody interrogation. Neither of these contentions is supported by the record.
We note preliminarily that the court's order of April 24, 1984, requires Beard to undergo the examinations and to answer questions. The order does *1120 not preclude Beard's attorney from attending the examinations to protect Beard's interests.
Beard's statement that the psychiatric examinations were "the equivalent of in-custody interrogations" demonstrates a misunderstanding of the purpose and nature of the examinations. Section 1026.5, subdivision (b) requires the court to appoint at least two, and not more than three, psychiatrists or psychologists to evaluate the patient in preparation for the trial on the petition for extension of commitment. A psychiatric examination in this context is not an adversarial proceeding. As in the similar context of extensions of civil commitments, the purpose of the examination is not to facilitate a criminal prosecution of the patient, but rather to obtain information necessary to evaluate the psychological condition of the patient and to assist in his treatment. (See Conservatorship of Mitchell (1981) 114 Cal. App.3d 606, 611-612 [170 Cal. Rptr. 759].)
The record bears out this medically diagnostic, rather than adversarial, characterization of the psychiatric examinations. Dr. Davis and Dr. Markman evaluated Beard's medical records to understand Beard's condition before speaking with Beard. Both doctors announced and explained the purpose of the interviews at the outset, and there is no hint in the record that either interview was conducted in the manner of a criminal in-custody interrogation. Beard has failed to demonstrate that the conduct of the court-ordered psychiatric examinations interfered in any way with Beard's right to effective assistance of counsel.

DISPOSITION
The judgment is affirmed.
Hanson (Thaxton), Acting P.J., and Crahan, J.,[*] concurred.
NOTES
[1]  Unless otherwise specified, all statutory references herein are to the Penal Code.
[2]  Although not direct evidence, Beard's courtroom behavior was cited by the psychologists and psychiatrists who testified as corroboration of their opinions. Beard repeatedly made loud, disruptive, inappropriate statements from his seat at the counsel's table during the course of the trial and punctuated the proceedings with many expletives.
[*]   Assigned by the Chairperson of the Judicial Council.
