John W. Hinckley Jr. returned to court yesterday after a day of watching his trial on closed-circuit television, telling the judge he "had a problem listening to the testimony" Wednesday.

"Your honor, I just, I don't wish to come and go on a whim or anything like that," Hinckley told Judge Barrington D. Parker, who summoned him to the lectern at the opening of the 18th day of testimony in his trial on charges of attempting to assassinate President Reagan.

"In the beginning I never really had the desire to come and go whenever I wanted to. That was not it, that was not what I was thinking. I was just, I had a problem listening to the testimony yesterday, and I feel today I can sit and listen to the remainder of the testimony," Hinckley said calmly as he stood before Parker surrounded by four deputy U.S. marshals.

Wednesday's testimony consisted of cross-examination of a defense psychiatrist, one of four expert witnesses who have portrayed Hinckley in graphic terms as suffering from a form of schizophrenia, a severe break with reality.

Yesterday all Hinckley heard was detailed medical and legal arguments about whether the jury should hear evidence that sophisticated X-rays showed his brain to be abnormally atrophied, or shrunken, for a man his age.

Dr. Daniel R. Weinberger, a psychiatrist for the National Institute of Mental Health, testified yesterday that studies of computer-enhanced X-rays, known as CAT scans, found brain atrophy in 30 percent of a group of patients diagnosed as schizophrenic, compared with about 2 percent of a group of normal persons.

Defense lawyer Gregory B. Craig suggested the medical evidence was important to what he called the "hotly disputed" issue of the credibility of Hinckley's own description of his mental state on the day of the shooting.

Prosecutors opposed the use of that evidence, and late yesterday, Parker denied the defense request to use the CAT scan results. He ruled that such physical factors are not generally accepted by the medical community as a way to either diagnose or support a finding of schizophrenia.

The jury spent the entire day outside the courtroom.

The defense is expected to rest its case today, after Parker decides whether jurors should view the film "Taxi Driver" as part of the trial. There has been extensive defense testimony that Hinckley, socially isolated and consumed by fantasies, took on many characteristics of the main character in that movie, who attempts to assassinate a presidential candidate.

When the defense is completed, the prosecution will begin what is expected to be a lengthy presentation of lay witnesses and expert psychiatrists to counter Hinckley's claim that he was legally insane when he wounded Reagan and three others more than a year ago.

Hinckley, dressed in a navy blue blazer and a red tie, sat quietly at the defense table throughout yesterday's long proceeding, occasionally writing and leafing through documents before him.

In the last two weeks, he has left his trial three times and in recent days has appeared increasingly disturbed by testimony from defense psychiatrists. They have told the jury that Hinckley suffered from a severe mental illness on the day of the shooting and should not be held criminally responsible for his acts.

Yesterday, Parker warned Hinckley that even if he was "distressed" by testimony or evidence in the case "you don't have the right to just stand up and walk out of court."

"Do you understand that?" Parker asked the 26-year-old defendant.

"Yes sir," Hinckley responded politely.

At another point, Parker told Hinckley that any request to be excused "will not be accepted" if he perceives that "this whole matter is being turned around" and that "there is a lack of genuineness . . . "

"I understand," Hinckley said, leaning into the microphone to be heard.

Before he sat down, Hinckley, responding to further questions from Parker, said he had no complaints about communication with his lawyers when he was outside the courtroom. "I'm fully competent to assist my attorneys and proceed with the trial," he told the judge.

Before Parker excused the jury for the day, he reminded them not to read or watch media accounts of the trial or try to seek information about the case outside the courtroom. Parker did not disclose whether any juror had made such an attempt.

"This is a serious business and I have to have you in a serious frame of mind," Parker told them. "This is the administration of justice."