Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Output Cell Array
Replies: 1   Last Post: Jul 28, 2014 5:14 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Yang

Posts: 2
Registered: 7/28/14
Output Cell Array
Posted: Jul 28, 2014 4:59 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

% 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
Read Output Cell Array
Yang
7/28/14
Read Re: Output Cell Array
Yang

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.