1

I have a 1x6 cell array. Each of the cells arrays contains a 5000x1 cell array comprising either strings or numbers. I would like to export that with fprintf in six columns separated by e.g. a backslash. I could use some help with that or, alternatively, on how to combine the data into a single 5000x6 cell array (I can manage to export this with a fairly simple loop).

Thanks in advance.

1 Answer 1

2

How about

[ my6Cell{:} ]

It should return a single cell array of size 5000x6

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks for the answer, although it does not seem to work. I get the following error "CAT arguments dimensions are not consistent". Any thoughts why that can be?
@aulky11 are you sure all the elements of my6Cell are 5000-by-1? is it possible you have an empty cell in the middle?
Yes. It's a 1x6 cell and each of these cells contains a 5000x1 cell. I am quite new to this, so could it be that cells 1-4 and 6 contain strings and cell 5 numbers?
Now I see. In the fifth cell I have 5000x1 double instead of cell. It was too small to see in the preview. I have converted it to cell and now works. Thanks a lot for the help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.