Home > other >  Matlab to run the code position 1 in the index of the beyond array boundaries, how to solve
Matlab to run the code position 1 in the index of the beyond array boundaries, how to solve

Time:09-26

> Pt='D: \ LLH \ image;
> Ext='*.jpg';
> Dis=dir (ext [pt]);
> NMS={dis. Name};
> Data=https://bbs.csdn.net/topics/zeros (length (NMS), 98304);
> For k=1: length (NMS)
Nm=[pt NMS {k}];
I=imread (nm);
Data (k, :)=reshape (I, 1983-04);
End
> N=2;
> [m, n]=size (data);
> The pattern=zeros (m, n + 1);
> Center=zeros (N, N);
> The pattern (:, 1: n)=data (:, :);
> For x=1: N
Center (x)=data (randi (20, 1), :);
End
Position 1 index beyond array bounds,
  • Related