0

I have two structures x1 and y1 both of sizes 680*1024*17.

When I am doing Y = cat(3,x1,y1), I get this error:

Subscript indices must either be real positive integers or logicals.

Anyone to help please?

diggy
  • 351
  • 1
  • 5
  • 23
  • I don't get any error like that, try this and tell if you are still getting an error: `a=randi([-4 4],[10 11 12]); b=randi([-4 4],[10 11 12]); c=cat(3,a,b);` – Autonomous Jun 29 '13 at 01:01
  • 1
    thanks for your help !! It was my big mistake .. I was somewhere using cat as a variable and then I was using it for concatenation. Again, my bad. – diggy Jun 29 '13 at 09:04
  • Also see [this question](http://stackoverflow.com/questions/20054047/subscript-indices-must-either-be-real-positive-integers-or-logicals-generic-sol) for [the generic solution to this problem](http://stackoverflow.com/a/20054048/983722). – Dennis Jaheruddin Nov 27 '13 at 15:48

1 Answers1

0

As you describe the function cat was accidentally overloaded by a variable.

Dennis Jaheruddin
  • 21,208
  • 8
  • 66
  • 122