Medical doctors who examined John W. Hinckley Jr. during the year before he shot President Reagan testified in federal court yesterday that he complained to them about stomach pain, lumps in his throat and a "rocking feeling" in his head, none of which could be tied to a physical illness.

A Lubbock, Tex., doctor who examined Hinckley while he was a college student there told the jury that he could find no explanation for Hinckley's symptoms "other than a depressive reaction."

The doctor, who appeared as a defense witness, testified that he gave Hinckley an antidepressant drug and then renewed the prescription after Hinckley turned down a suggestion that he have a psychological evaluation.

The doctor, Baruch Rosen, testified during the fourth day of Hinckley's trial on charges of trying to assassinate the president. Rosen told the jury he again recommended a psychological exam after Hinckley complained that he was "nervous or anxious." Rosen said he gave Hinckley a prescription for a week's worth of Valium after Hinckley asked for a tranquilizer. When Hinckley showed a marked improvement, Rosen said, he renewed the Valium prescription for six weeks.

Rosen testified he never saw Hinckley again.

Hinckley, his chin in his hand on the edge of the defense table, leafed through a document as his hometown doctor recalled the Hinckley family's concern when, in early 1980, their youngest son was 60 pounds overweight.

He laughed when another doctor described Hinckley's steady diet of hamburgers, french fries, soda and pizza, and he smiled when the doctor conceded that Hinckley's nighttime stomach pains could be due to his pizza dinners. By the end of the day, Hinckley, always surrounded by deputy U.S. marshals, was sitting back in his chair with his arms behind his head.

During cross-examination, Rosen testified that he thought Hinckley's complaints about nervousness, anxiety, heart palpitations and tingling sensations were typical of the complaints he receives from university students.

Yesterday's testimony came as Hinckley's lawyers continued to try to persuade the jury that Hinckley was legally insane when he wounded President Reagan and three others on March 30, 1981, in an attack outside the Washington Hilton Hotel.

The case is expected to hinge on expert testimony from psychiatrists for the prosecution and the defense who have examined Hinckley since his arrest.

Before the medical doctors took the stand, Hinckley's mother, JoAnn, wound up nearly six hours of testimony on her son's behalf. She told the jury a Denver psychiatrist who met with Hinckley from October 1980 to February 1981 told the family that her son, who was then 25 years old, "thought more like a 14-year-old." The family, she said, wanted Hinckley to be self-sufficient, to get a job and sever his long dependence on his family for financial support.

According to her testimony, the psychiatrist, Dr. John Hopper, consulted with the parents and a plan was drawn up that required that Hinckley be out of the family's suburban Denver home by March 30--the day Hinckley shot Reagan. Hopper is expected to be the first witness Monday morning.

During cross-examination yesterday by Asssistant U.S. Attorney Robert R. Chapman, Mrs. Hinckley said her husband repeatedly "lectured" her son about his failure to get and hold a job. While he was in and out of Texas Tech University in Lubbock, Hinckley worked as a busboy at a supper club and at a pizza parlor. He made several unsuccessful trips to Hollywood to try to start a career in rock music and once started a mail-order business, Mrs. Hinckley told the jury.

During yesterday's court session, the defense introduced into evidence a letter that Hinckley wrote to his parents in November 1979 but never mailed. It was discovered after the March 30 shooting, packed in a carton in the Hinckleys' garage. Hinckley's mother said the box had been overlooked by FBI agents who searched the family home after her son's arrest.

In the document, written in an almost illegible scrawl, Hinckley wrote, ". . . I feel there is something wrong with me mentally as well as physically. I'm so depressed, it's all I can do to get out of bed in the morning and go to class." He wrote that he was considering asking the school psychologist for some help.

"My thoughts are not normal and neither is my life," he wrote.

During four days of testimony, both the defense and prosecution have put in evidence a voluminous collection of Hinckley's writings. Most of the writings were found by the FBI in Hinckley's Washington hotel room the day of his arrest and more were collected from the Hinckley home. The documents overlooked, and found by Hinckley's parents after the shooting, included a long and bitter essay about the December 1980 murder of John Lennon entitled "I read the news today, oh no!"

"Guns are neat little things, aren't they? They can kill extraordinary people with very little effort. But don't say a word about it to the NRA," Hinckley wrote, referring to the National Rifle Association. The essay continues, with a reference to President Reagan.

"The rich are getting richer and the poor don't know what the hell is going on and most important of all, Ronald Reagan never missed a beat. Of course, he's not a fan of gun control. How can you make a western movie without guns, guns, guns?"