不知道你的n是多大,反正我的机器上n是1000还没问题,我查到了out of memory错误的说明:<BR>MEMORY Help for memory limitations.<BR> If the OUT OF MEMORY error message is encountered, there is<BR> no more room in memory for new variables. You must free up<BR> some space before you may proceed. One way to free up space<BR> is to delete some variables (see CLEAR). Another is to<BR> issue the command PACK (See PACK). PACK compresses the data<BR> in memory, opening up larger contiguous blocks.<BR> <BR> Here are some additional system specific tips:<BR> Windows: Increase virtual memory by using System in the Control Panel.<BR> Unix: Ask your system manager to increase your Swap Space.<BR>大概是说你可以用clear来清理内存,或者用pack来压缩内存中的数据,你打help clear(pack)试试。<BR>或者提高虚拟内存。