【问题标题】:What is wrong in this Discrete Integration with Galois Fields in MatlabMatlab 中与伽罗瓦场的离散积分有什么问题
【发布时间】:2013-11-12 23:35:54
【问题描述】:

我想在时间步长不恒定的 Matlab 中实现与伽罗瓦域的离散积分。 假设它是这样的:

我的尝试

function [ int ] = integrate_matlab( YDataVector, a, b )
%integrate_matlab Calculate the discrete integral
%   Discrete Matlab Integration
%   int_1^N x(t_k) * (b-a)/N, where t_k = a + (b-a) k/N
%
%   YDataVector - Galois vector (255 x 1 gf), this is signal,
%   which values you can reach by YDataVector.x
%
%   int - returns Galois vector (255 x 1 gf)

N = length(YDataVector);
for k=1:N
    tk = a + (b - a) * k/N;
    int = xtk(YDataVector, k) * (b - a) / N;   
         %   How to implement the function xtk(YDataVector)?
end

然后是函数 xtk

function [ xtk_result ] = xtk( YDataVector, k )
%xkt Summary of this function goes here
%   YDataVector - Galois vector (255 x 1 gf), this is signal
%   xtk_result - Galois vector (255 x 1 gf)
%   k - index, this must be here to be able calculate different xtk for different iterations

    xtk_result = ; //  I do not know what to fill here

end

我对 tk 的数学级数方程 x(tk) 感到困惑。 我知道我现在做错了。 x(tk) 的写法只是让我感到困惑,因为我认为它是系列中的一个函数。 我知道它是某个时间点的信号,这里是 YDataVector,但是我忘记了如何实现它。 我可能应该先迭代这个系列:

t_0 = a;
t_1 = a + (b - a) * 1/N;

这似乎没有帮助,因为 tk 不是迭代定义的。

在实现系列 x(tk) 时我在想什么?

【问题讨论】:

    标签: matlab integration discrete-mathematics galois-field


    【解决方案1】:

    假设 t 包含对应于 x 的每个元素的时间(存储在 YDataVector.x 中)。然后,如果我正确理解了您的问题,您可以通过以下方式获得 x_tk:

    N = length(YDataVector.x) ;
    k = 1 : N;
    tk = a + (b-a)* k/N ;
    x_tk = interp1(t,YDataVector.x,tk);

    【讨论】:

    • 你说得对,它也包含时间。您必须对 interpl 表示函数 interp1,因为数据是一个只有 1D 的信号。
    猜你喜欢
    • 1970-01-01
    • 2017-08-16
    • 1970-01-01
    • 2012-07-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-10-14
    • 2015-07-10
    相关资源
    最近更新 更多