0

how can I get a matrix out of cell array?

here is my cell array:

d{1} = [[1 1]; [2 2]; [3 3]]
d{2} = [[1 2]; [2 3]]

I want to get the first matrix out of d{1} which should give me [1 1] but I tried this:

d{1}(1) and It only gives me the first element in the cell. How can I get it to return these cells as a matrix?

1 Answer 1

1

As you want to access both columns of the first row. So, simply do this: d{1}(1,:)

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

1 Comment

Thanks, this is exactly what I needed!

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.