Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


Yang
Posts:
2
Registered:
7/28/14


Output Cell Array
Posted:
Jul 28, 2014 4:59 PM


% initialize an empty cell array % G= cell(Ng,Ng); ........... celldisp(G) % loop through all neighbor boxes % close = 2; for j=1:N PL= []; for i= pointGrid(n,1)close:pointGrid(n,1)+close for p = pointGrid(n,2)close:pointGrid(n,2)+close m =G{i,p}; fprintf('%d\n',please); PL = [PL;please]; end end k = 0; for k = PL if ~(k==j) fprintf('%d\n',k) end end end Hi, I have assign a cell array with different number of points. Then in the loop, I am trying to read out the cell array number by using m = G{i,p}. However, I keep getting the message saying that Subscript indices must either be real positive integers or logicals. I just try to assign what G{i,p} has into m, why it doesn't work.
Please help. Thanks in advance


Date

Subject

Author

7/28/14


Yang

7/28/14


Yang


