⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rssxy.m

📁 Matlab GPS Toolbox
💻 M
字号:
%                           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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -