2

I have a cell array with arrays inside, how can I plot this?

data = {[1,2], [5,6], [9,15]}

I want to plot the arrays like points.

P(x,y) = P(1,2)
P(x,y) = P(5,6)

etc.

1 Answer 1

3

This should do the trick:

mat = reshape(cell2mat(data),2,size(data,2));
scatter(mat(1,:),mat(2,:));
Sign up to request clarification or add additional context in comments.

1 Comment

I love you with all my heart.

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.