write a matlab code to compute golomb sequence
显示 更早的评论
Is there any function for golomb sequence in matlab?. write the code to display the golomb sequence [the numbers ].
采纳的回答
更多回答(2 个)
Aamod Garg
2017-2-7
编辑:Aamod Garg
2017-2-7
function [seq] = golomb(n)
%n is defined by user
a = zeros(1,n);
a(1,1) = 1;
for j = 2:n
a(1,j) = 1+a(1,j-a(1,a(1,j-1)));
seq = a;
end
pallarlamudi bharadwaj
2017-2-9
if true
% code
end
类别
在 帮助中心 和 File Exchange 中查找有关 Encryption / Cryptography 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!