Can you help me with xlswrite?

3 vues (au cours des 30 derniers jours)
Kyungsun Ha
Kyungsun Ha le 6 Mar 2017
Commenté : KSSV le 6 Mar 2017
>> n=10;
for k=1:n;
exp_tmp=['DNA',num2str(k),'=randseq(20);'];
eval(exp_tmp);
xlswrite('C:\Users\BFSL\Desktop\1.xlsx',[strcat('DNA',num2str(k))],strcat('A',num2str(k),:,'B',num2str(k)));
end
I want to make...
1. generate random DNA -> 2. save in excel like this(image below);
but reality is... (below)
can someone help me?
+generating is success

Réponse acceptée

KSSV
KSSV le 6 Mar 2017
Modifié(e) : KSSV le 6 Mar 2017
clc; clear all ;
n=10;
exp_tmp = cell(n,2) ;
for k=1:n;
% exp_tmp{k}=['DNA',num2str(k),'=randseq(20);'];
% exp_tmp{k}=['DNA',num2str(k),' generated sequence',num2str(k)] ;
exp_tmp{k}=['DNA',num2str(k),' ',randseq(20)] ;
% eval(exp_tmp);
% xlswrite('C:\Users\BFSL\Desktop\1.xlsx',[strcat('DNA',num2str(k))],strcat('A',num2str(k),:,'B',num2str(k)));
end
xlswrite('DB.xls',exp_tmp) ;
  4 commentaires
Kyungsun Ha
Kyungsun Ha le 6 Mar 2017
randseq is function.. (randomly generate DNA sequence)
KSSV
KSSV le 6 Mar 2017
Answer edited..

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Mapping Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by