在MATLAB里面用哪个命令取一个矩阵的子矩阵?
楼主 · 1 楼
switch SIGMA
case{Nrep=1}
SIGMA= input(3,Nrep+2);
case{Nrep=2}
SIGMA= input(1:Nrep,3:Nrep+2);
case{Nrep=3}
SIGMA= input(1:Nrep,3:Nrep+2);
case{Nrep=4}
SIGMA= input(1:Nrep,3:Nrep+2);
case{Nrep=5}
SIGMA= input(1:Nrep,3:Nrep+2);
case{Nrep=6}
SIGMA= input(1:Nrep,3:Nrep+2);
case{Nrep=7}
SIGMA= input(1:Nrep,3:Nrep+2);
case{Nrep=8}
SIGMA= input(1:Nrep,3:Nrep+2);
otherwise
display(['Unknown SIGMA:'SIGMA])
end
这样取,程序怎么出错呀
case{Nrep=1}
SIGMA= input(3,Nrep+2);
case{Nrep=2}
SIGMA= input(1:Nrep,3:Nrep+2);
case{Nrep=3}
SIGMA= input(1:Nrep,3:Nrep+2);
case{Nrep=4}
SIGMA= input(1:Nrep,3:Nrep+2);
case{Nrep=5}
SIGMA= input(1:Nrep,3:Nrep+2);
case{Nrep=6}
SIGMA= input(1:Nrep,3:Nrep+2);
case{Nrep=7}
SIGMA= input(1:Nrep,3:Nrep+2);
case{Nrep=8}
SIGMA= input(1:Nrep,3:Nrep+2);
otherwise
display(['Unknown SIGMA:'SIGMA])
end
这样取,程序怎么出错呀