How to make a character array from loop output?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Aniston Gnana
am 8 Nov. 2017
Kommentiert: Aniston Gnana
am 9 Nov. 2017
The function is mean't to generate nine random DNA sequence of different lengths (between 4 and 6 letters long), I am then supposed to sort these in alphabetical order. I'm having trouble adding the different output iterations of my loop into an array so that I can use "sort" to sort them alphabetically.
if true
function dna = SeqGen
%Randomly generates a sequence of DNA 9 times
for i = 1:9
k = randi([4,6],1);
seq = randseq(k ,'Alphabet', 'dna');
end
end
I'm not sure if i'm supposed to use char() or something else.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Large Files and Big Data finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!