Clear Filters
Clear Filters

How to convert the 1D matrix into 2D matrix?

26 views (last 30 days)
I have 1D matrix.now I want to convert the 1D matrix into 2D matrix.can you give me the code to convert it?

Accepted Answer

Birdman
Birdman on 8 Feb 2018
Edited: Birdman on 8 Feb 2018
By using reshape function:
A=randi([1 6],1,10); %demo data
reshape(A,2,[])

More Answers (0)

Categories

Find more on Resizing and Reshaping Matrices in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!