2009年1月5日

如何在for迴圈中,產生變數名稱跟i有關。

for i = 1 : 4
eval( [ 'class' , num2str( i ) , '=' , num2str( i+4 ) , ';' ] )
end上但是只能是一個值。而不能有一個值以上的用法。