Industrial production edged up by 0.4 percent last month followed a decline of the same size in February, the Federal Reserve Board reported yesterday. A jump in auto production was largely responsible for the increase in overall output during March.

Meanwhile, the Commerce Department reported a rise of $4.9 billion in manufacturing and trade inventories during February following an increase of $3.4 billion in January. There was a slight rise in the ratio of inventories to sales in February. The inventory rise may have been too small to do more than compensate for inflation, the chief economist at the Commerce Department, William Cox, said yesterday.

Many experts have been predicting a slowdown in the economy, but growth remained quite strong in the first three months of the year, according to preliminary figures from the Commerce Department. However, Allen Sinai of Data Resources Inc. commented yesterday that the March industrial figures "said the economy is going nowhere."

The rise in March reflected a little rebound in auto production, he said, adding that it did not indicate any permanent upward momentum in the economy. Cox said the rise was "about what we expected" because it already was known that auto assemblies increased sharply between February and March.

Without the rise in auto assemblies, there would have been only a 0.1 increase in production, he said. Production of consumer goods, excluding autos, fell by 0.2 percent between February and March.

Auto production is expected to remain high in April, thereby underpining total production, Cox said. The coal strike will dampen output slightly for the month. But figures released earlier this week showed that auto sales were down early this month, after the end of the latest round of rebates. This suggests that the auto sector may not continue to provide strength for the economy.

Sinai and Cox agreed that the February and March production figures together show a flattening economy. "Overall through the first quarter" the economy was slowing down, "and more so for industrial production than for some other sectors," Cox said.

Sinai said that with auto sales now dropping, "I think we will see some lower numbers" for industrial output in coming months. No sector other than military spending is showing any growth."

Output in March was down by 0.3 percent from a year earlier. The six straight months of growth from last fall did not outweigh the sharp drop in production during the recession a year ago. But industry was producing 0.8 percent more last month than at the 1980 trough in July last year.

The Fed report showed that industrial output in the first three months of this year averaged 1.6 percent higher than in the fourth quarter of 1980. Production of home appliances was up slightly in March, but output of consumer nondurables edged down.

Business-equipment production rose by 0.8 percent, the Fed report showed. This was largely because of increased production of building and mining equipment and trucks.

Output in the defense and space industry was up 4 percent from a year earlier for the only sizeable rise in any category. During March this sector increased production by 0.3 percent.

Cox said much of the inventory rise was due to a drop in wholesale sales of petroleum with warmer weather and increased conservation efforts. This led to a buildup of involuntary stocks of petroleum.