?? rssxy.m
字號(hào):
% rssxy.m
% Scope: This MATLAB macro computes root sum square (RSS) of a
% two component vector sample.
% Usage: y = rssxy(x)
% Description of parameters:
% x - input, sample vector, x(i,*) is an i-th two component
% vector sample
% y - output, RSS value, y(i) is the RSS of the i-th two
% component vector sample
% Last update: 04/19/00
% Copyright (C) 1996-00 by LL Consulting. All Rights Reserved.
function y = rssxy(x)
[m,n] = size(x);
if n ~= 2
error('Error - RSSXY; the sample does not have two 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));
end
else
error('Error - RSSXY; the sample has no meaningful dimension');
end
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -