MATLAB: How to convert a column vector into an image Hello sir I have an vector of size (258×1). Now I want to convert it into a square matrix (101×101) i.e. in 2D image in matlab. Please help me. Best Answer nrow = 6; ncol = 6;B = full( sparse(C(:,1), C(:,2), A, nrow, ncol) );Ornrow = 6; ncol = 6;B = accumarray(C, A(:), [nrow ncol]); Related QuestionReplacing a Column vector valueHow to convert a matrix to a vectorIndexing entry of a matrix resultSTORAGE OF SELECTIVE VALUES OF SOME CELLS INTO A SINGLE MATRIX FROM TWO DIFFERENT MATRICES. Whats wrong with thisMatrix dimensions must agree.