vikki1995
2008-01-09, 18:51
关于元胞数组能否用于循环数组程序,请教各位高手。
for e=1:1:10
ljhist{e}(1)=i{e}(1)
end
for e=1:1:10
for f=1:1:15
ljhist{e}(f+1)=ljhist{e}(f)+i{e}(f+1)
end
end
这样行不行,请大家帮忙看看,谢谢。
运行问题
The variable "ljhist" is also the name of this script.
This is illegal, because it will be the name of a script and a variable
in any context from which the script is called.
for e=1:1:10
ljhist{e}(1)=i{e}(1)
end
for e=1:1:10
for f=1:1:15
ljhist{e}(f+1)=ljhist{e}(f)+i{e}(f+1)
end
end
这样行不行,请大家帮忙看看,谢谢。
运行问题
The variable "ljhist" is also the name of this script.
This is illegal, because it will be the name of a script and a variable
in any context from which the script is called.