function Q = gramSchmidt(V) n = size(V, 2); % 获取向量个数 Q = zeros(size(V)); % 初始化正交向量组Q for i = 1:n Q(:, i) = V(:, i); % 将Vi赋值给Qi for j = 1:i-1 Q(:, i) = Q(:, i) - proj(Q(:, i), Q(:, j)); % 计算投影向量并减去 end Q(:, i)...