MATLAB: Can i obtain this format formatmatrix manipulation i want to get this matrix, can anyone help me ? pi 0 0 10 pi 1 00 1 pi 01 0 0 pi Best Answer eye(4) * pi + fliplr(eye(4))would be one easy way. Related SolutionsMATLAB: Replacing Matrix Cells with Date Values d={'01/04/2004' '02/04/2004' '03/04/2004' '04/04/2004' '05/04/2004' '06/04/2004' '07/04/2004'}v=num2cell(randi([0 1],4,7))idx=cell2mat(v)==1for k=1:7 v(idx(:,k),k)=d(k)end MATLAB: Removing empty cell in array Probably there is an easier way..Mat=Mat(~cellfun('isempty',Mat));Mat=reshape(Mat,[],4) Related QuestionThe output is weirdHow to select particular rows from a matrixHow to store the results from a for loop into a matrixHow many zeros do I have before a specific sting variable
Best Answer