write a matlab code to compute golomb sequence
Mostra commenti meno recenti
Is there any function for golomb sequence in matlab?. write the code to display the golomb sequence [the numbers ].
Risposta accettata
Più risposte (2)
Aamod Garg
il 7 Feb 2017
Modificato: Aamod Garg
il 7 Feb 2017
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
il 9 Feb 2017
if true
% code
end
Categorie
Scopri di più su Encryption / Cryptography in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!