📄 rss.m
字号:
% rss.m
% Scope: This MATLAB macro computes root sum square (RSS) of a
% three component vector sample.
% Usage: y = rss(x)
% Description of parameters:
% x - input, sample vector, x(i,*) is an i-th three component
% vector sample
% y - output, RSS value, y(i) is the RSS of the i-th three
% component vector sample
% Last update: 04/19/00
% Copyright (C) 1996-00 by LL Consulting. All Rights Reserved.
function y = rss(x)
[m,n] = size(x);
if n ~= 3
error('Error - RSS; the sample does not have three component vectors');
end
if m >= 1
for i = 1:m
y(i) = sqrt(x(i,1) * x(i,1) + x(i,2) * x(i,2) + x(i,3) * x(i,3));
end
else
error('Error - RSS; the sample has no meaningful dimension');
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -