MATLAB: Creating a symmetric matrix from a single column vector column vectorsymmetric matrix How do I create a symmetric matrix from a given column vector, e.g. [1 2 3; 2 1 2; 3 2 1] from [1; 2; 3]? I have a 84×1 column vector of data so need a quick method. Best Answer That same example is in the documentation for the toeplitz function. Related SolutionsMATLAB: “symmetrical” rows of matrix I present the best solution so far:d = ~pdist2(A(:,1:end/2), A(:,end/2+1:end));[iA1, iA2] = find(triu(d & d.')); MATLAB: Skew symmetric matrix generation s = [1 0 0 2 0 0 3 1 2]';% find size and logical indexN = size(s,1);tf1 = mod(0:N-1, 3) == 0;tf2 = mod(0:N-1, 3) == 1;tf3 = mod(0:N-1, 3) == 2;ansref = zeros(N,N); % initalize answer%perform assignmentansref(tf2,tf3) = diag(-s(tf1));ansref(tf3,tf2) = diag(s(tf1));ansref(tf1,tf3) = diag(s(tf2));ansref(tf3,tf1) = diag(-s(tf2));ansref(tf1,tf2) = diag(-s(tf3));ansref(tf2,tf1) = diag(s(tf3)); Related QuestionHow to create a lower triangle matrix from a single column matrix.How to select a matrix, row and column vector from within a matrixHow to generate a symmetric Toeplitz matrix
Best Answer