0

I don't think I know tricks to use repmat in Matlab yet. I tried a number of combination and I am not able to achieve what I need.

I have a vector A of size 1 x 20. I just want to stack A to create 3 x 5 x 20 size matrix. Can you please help ?

1

1 Answer 1

2
A = 1:20;
reshape(repmat(A, [15, 1]), [3,5,20])
Sign up to request clarification or add additional context in comments.

Comments

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.