I have one column data 57600 points, how can i convert it to 240 by 240 matrix!

2 次查看(过去 30 天)
I have one column data 57600 points, how can i convert it to 240 by 240 matrix!

回答(2 个)

James Tursa
James Tursa 2023-4-17
x = your column vector
result = reshape(x,240,240);
or you might need the transpose:
result = reshape(x,240,240).';

the cyclist
the cyclist 2023-4-17
% Input
V = rand(57600,1);
% Reshape it
M = reshape(V,240,240);
You may need to transpose M for your purposes.

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by