Independent presidential candidate Lyndon H. LaRouche Jr. took the stand yesterday in the trial of his $150-million libel suit against NBC Television and testified that the "prime function" of his life has been damaged and danger to his life "considerably increased" as a result of two controversial network broadcasts.

LaRouche's testimony yesterday marked his first appearance in court since the trial began in U.S. District Court in Alexandria Oct. 22. And security measures, which have been the subject of private court conferences throughout the legal proceedings, were obviously tightened.

Before his appearance in court and during breaks in his testimony, LaRouche, who said yesterday that the only public figure in more danger than himself was President Reagan, remained in a locked witness room with a cadre of personal aides. He was accompanied to and from a restroom and the second-floor courtroom by as many as four security aides. Two off-duty Alexandria police officers, who said they were hired by LaRouche, were posted on the main floor of the federal courthouse.

The trial focuses on two NBC broadcasts aired earlier this year that LaRouche says maliciously defame him as the anti-Semitic leader of a "political cult" that engages in smear campaigns and harassment of reporters and that sabotaged campaign apearances by Democratic presidential candidate Walter Mondale.

In one of the broadcasts, a man identified in court as Gordon Novelle said that in 1977 LaRouche told his top staff he wanted to assassinate President Carter, Zbigniew Brzezinski, David Rockefeller and other high administration officials.

During yesterday's nearly six hours of questioning, LaRouche attorney Odin P. Anderson focused on several of the charges made in the broadcasts and asked LaRouche to respond to their veracity.

LaRouche, who has twice sought the Democratic Party's presidential nomination, answered most of the charges by saying those who believe them are "crazy," "insane" or "a total illiterate and mental case."

He bluntly answered the assassination theory, saying, "I despised Jimmy Carter. I made no bones about that." But he denied such a plan and said he even tried once to assure Carter's safety when the president was in France. He was not asked to elaborate.

Speaking with a slight New England accent, LaRouche, 62, said he had no knowledge about or responsibility for the alleged harassment, featured in the broadcasts, of reporters whose work about him has been unfavorable.

The three-time presidential candidate, who will be on the Nov. 6 ballot in 19 states including Virginia, also denied charges made in the broadcast by people identified only as "LaRouche defectors." He called untrue their allegation that he has cultlike influence over his followers and said there is "no such thing as a LaRouche organization."

LaRouche, who is known as the leader of the right-wing National Democratic Policy Committee, said he belongs only to a loose association of people around the world involved in similar endeavors -- including Indian Prime Minister Indira Gandhi, members of the Vatican and former Mexican president Lopez Portillo.

The Anti-Defamation League of B'Nai B'rith also is a defendant in the case because of an ADL official's statements in the broadcasts that LaRouche is "a small-time Hitler" who blames Jews for the Holocaust and international drug smuggling.

"Only a mental case can consider me anti-Semitic," LaRouche said.

Throughout the trial, which is expected to be concluded this week, the atmosphere has been one marked by concerns over security. Late last week, Judge James C. Cacheris advised jurors to have a family member open their mail, noting that someone might try to influence them through mailed literature. Earlier last week, NBC reported that a death threat was called into an NBC producer named in the suit and a juror later asked to be excused because she said she feared for her safety.

Calling himself "an economist and philosopher of some significance," LaRouche compared his beliefs yesterday with the writings of Plato, St. Augustine and Dante.