I have a column matrix $A$ . I need to find the RMS value of it.
To add a scalar, I do $A$=$A+k$
To multiply a scalar, I do $A$=$A.*k$
To get RMS, I have a way which is running a loop -
for n=1:N
count=count+A(n)*A(n);
end
But, I have a large value of $N$ and nested loops. So, It's gonna take a real long time. Is there any short way? Thanks in advance.
Is it Matlab? If so, Just do
It should work.
Why? $A'$ is nothing but the transpose of $A$. So, If $A=[a1,a2,a3..an]$ , then $A'$ is the column matrix of the same values. Multiplying will give - $a1^2+a2^2..$