[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Vectorization of matrix
From: |
mayank9889 |
Subject: |
Re: Vectorization of matrix |
Date: |
Mon, 17 Jun 2019 08:59:05 -0500 (CDT) |
This is the complete code
%X is 97 x 3 matrix
X_norm = X;
mu = zeros(1, size(X, 2));
sigma = zeros(1, size(X, 2));
mu = mean(X);
sigma = std(X);
t = ones(length(X), 1);
X_norm = (X - (t * mu)) ./ (t * sigma); % Vectorized
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html