image thumbnail
from Reshape 1D to 2D with Balance by Dr. Murtaza Khan
Reshapes 1D array to 2D array with size of rows and columns of B is balance

reshape1dto2dbalanceTest.m
clc,  clear all, close all
line='-----------------------------------------------------------------------';

A=[1:9]
B=reshape1dto2dbalance(A)
disp(line);
A=[1:12]
B=reshape1dto2dbalance(A)
disp(line);
A=[1:5]
B=reshape1dto2dbalance(A)

% % % --------------------------------
% % % Author: Dr. Murtaza Khan
% % % Email : drkhanmurtaza@gmail.com
% % % --------------------------------

% % Accompaneid program factor2.m is written by
% % Brett Shoelson, Ph.D.
% % shoelson@helix.nih.gov

Contact us at files@mathworks.com