if true % code
endclear all;close all;clcsample_dna = fastaread('sequence_AF099922.Fasta');sample_dna = struct2cell(sample_dna);sample_dna = cell2mat(sample_dna(2));sample_dna = sample_dna(7021:15020);cds = [928 1038 2527 2856 4113 4376 5464 5643 7254 7604];for ctr = 1:2:length(cds)actual_exons(cds(ctr):cds(ctr+1))=1;endactual_exons(cds(length(cds))+1:length(sample_dna)) =0;[x] = dna_binary(sample_dna);ln = length(x);xk = zeros (1,ln);% code block to find the DFT of the sequence
i = sqrt(-1);for k = 0: ln-1for n=0: ln-1xk(k+1) = xk(k+1) + (x(n+1)*exp((-i)*2*pi*k*n/ln));endendY = abs(xk),^2;P = Y/max(Y);plot(actual_exons,'k:');hold onplot(P);axis([0 8000 0 1.05])xlabel('Nucleotide position');ylabel('Output');title('Detection of period three behaviour using DFT');
MATLAB: I want to find DFT of a input sequence. I have run the following code but not getting desired output. Is there any mistake? please help.
dftpsd
Related Question
- Does the Bioinformatics Toolbox support Selenocysteine
- The input character is not valid in MATLAB statements or expressions
- Does the score returned by NWALIGN not behave intuitively when I use the ambiguous symbols āWā or āVā in the Bioinformatics Toolbox 3.0 (R2007b)
- Does Matlab support bed, wig, and other usual genomics file formats
- I want to make a full string from all the “a” values that i get
- Keeping track of numbers randomly generated
- Plot inside a function
Best Answer