The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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 ]

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);
% 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};

PL = [PL;please];
k = 0;
for k = PL
if ~(k==j)

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
Read Output Cell Array
Read Re: Output Cell Array

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.