MATLAB: Square Matrix excelMATLABmatrix i have a very simple quetion. Say , a Matrix (5×1)named A. A= [ 2;2;2;2;2 ] How I can make a square matrix (5×5) with all 2 contained from command window taking the A from an excel file ? Best Answer If you want to take a vector from excel and replicate it such that the result is a square matrix, then:a = xlsread('myfile.xlsx');a = repmat(a(:),1,numel(a)); Related SolutionsMATLAB: Insert Values of a Matrix from row 2 using XLSWRITE A = ones(5,20);xlswrite('Workbook.xls',A,'Sheet1','A2') MATLAB: Norm square Is Pu a vector resulting from multiplying a vector by a matrixP = randn(2,2);u = randn(2,1);norm(P*u,2) Related QuestionHow can i write a matrix into a single row of excel sheetSquare waveHow to export a matrix from MATLAB to ExcelNon square matrix rotation
Best Answer