全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 MATLAB等数学软件专版
4215 3
2016-06-10
这是怎么回事 这是怎么回事
2..不输入rscore函数的源代码,直接使用,会出现

[R,xmin,xrang]=rscore(x)

错误使用 rscore

Not enough input arguments.

3.MATLAB 文件帮助: rscore,是这样写的。

The core function in Reed-Solomon decode.

        MSG = rscore(CODE, K, TP, M, POW_M, T2) decodes a single codeword

        vector CODE using the Reed-Solomon decoding technique. The message length

        is K. The complete (and correct) list of all members in GF(2^M) is

        in TP. The code word length is provided in POW_M, which equals

        2^M - 1. The decoding result is provided in the output variable MSG.


        [MSG, ERR] = rscore(CODE, K, TP, M, POW_M, T2) outputs the error

        detected in the decoding.


        [MSG, ERR, CCODE] = rscore(CODE, K, TP, M, POW_M, T2) outputs the

        corrected codeword in CCODE.


        NOTE: Unlike all of the other encoding/decoding functions,

        this function takes exponential input instead of regular input for

        processing. For example [-Inf, 0, 1, 2, ...] represents

        [0 1 alpha, alpha^2, ...] in GF(2^m). There are 2^M elements in

        GF(2^M). Hence, the input CODE represents 2^M * (2^M - 1) bits of

        information. The decoded MSG represents 2^M * K bits of information.

        To speed computation, no error-checking is placed in this function,

        all input variables must be present.

没有看明白。

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2016-7-17 18:53:20
function[R,xmin,xrange]=rscore(x,dim)
%极差归一化变换
%R=rscore(x)对x进行极差归一化变换,这里x可以是向量、矩阵或高维数组。
%若x是一个向量,返回变换后结果向量R=(X-min(X))./range(X);若X是一个矩阵,
%则用X的每一列最小值和极差对该列进行极差归一化变换,返回变换后的矩阵为R;若X是
%一个高位数组,则沿X的首个非单一维方向计算最小值和极差,然后对X进行归一化
%变换,返回变换后高维数组R.列如X是一个1*1*1*4的4维数组,由于X的前三维均
%为单一维,于是计算X的第4维方向上的最小值和极差,对X进行极差归一化变化,返回的
%R也是一个1*1*1*4的4维数组。
%[R,xmin,xrange]=rscore(X)还返回X的最小值xmin=min(X)和极差xrange=range(X).
%
%[...]=rscore(X.dim) 用dim参数指定沿X的哪个维进行极差归一化变换,列如dim1,
%表示对X的各列进行极差归一化变换;dim=2,表示对X的各行进行极差归一化变换。
%
%请参考zscore,min和range函数的用法。
%
%Copyright 2009 - 2010 xiezhh.
%&Revision:1.0.0.0 & &Data:2009/12/2 15:58:36 &

if isequal(x,[]),z =[];return;end

if nargin<2
    %Figure out which dimension to work along.
    dim=find(size(x)=1,1);
    if isempty(dim),dim=1;end
end
%Compute X's min and range,and standardize it
xmin=min(x,[],dim);
xrange=range(x,dim);
xrange0=xrange;
xrange0(xrange0 = = 0) = 1;
R=bsxfun(@minus,x,xmin);
R=bsxfun(@rdivide,R,xrange0);
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-6-26 15:20:45
matlab自带的rscore函数,参数比较多,自己写个参数少点的吧,这个论坛里就有相关代码,我下载下来了,运行成功!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-7-29 23:25:33
yqy89 发表于 2018-6-26 15:20
matlab自带的rscore函数,参数比较多,自己写个参数少点的吧,这个论坛里就有相关代码,我下载下来了,运行 ...
您好,请问可以您找到的Matlab 的rscore函数发我一个好吗?麻烦您了 zackjhs@163.com 谢谢您了

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群