Am I using this syntax correctly?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I created the following code to obtain the results saved in various formats, am I doing it correctly.
file1='/Users/armandoferr/Documents/MATLAB/images_sofia.xls';
file2='/Users/armandoferr/Documents/MATLAB/images_sofia.xlsx';
file3='/Users/armandoferr/Documents/MATLAB/images_sofia.txt';
data = cell(newDimensao+1,3);
data(1,:)={'N. Imagem', 'Nome da Imagem', 'Data da Conversao'};
data(2:end,1) = {x};
data(2:end,2) ={imgDir(x).name};
data(2:end,3) =cellstr(repmat(datestr(now,'dd/mm/yyyy'),newDimensao,1));
xlswrite(file1,data);
xlswrite(file2,data);
dataNow = datestr(now,'dd/mm/yyyy');
ficheiro=fopen(file3,'w');
fwrite(ficheiro,'N. Imagem ','Nome Imagem','Data da Convers?ao');
fwrite(ficheiro,x,imgDir(x).name, dataNow);
fclose(ficheiro);
tanks
I want to save each cell data from array like this example:
N. Image Name Image Peaces Date Convertion
#1 100071.jpg 3 06/10/2012
#2 100072.jpg 5 06/10/2012
#3 100073.jpg 1 06/10/2012
#4 100074.jpg 9 06/10/2012
#5 100075.jpg 8 06/10/2012
#6 100076.jpg 4 06/10/2012
#7 100077.jpg 6 06/10/2012
0 commentaires
Réponses (2)
Image Analyst
le 9 Oct 2012
Wouldn't you know if you just opened those files and see if they look like you want them to look? As far as syntax goes, the mlint error check will tell you with a red line and squiggled underline, and in addition, you'll get an error upon running if the syntax is incorrect. Since you didn't list any errors, I assume that there is no syntax error.
0 commentaires
Voir également
Catégories
En savoir plus sur Spreadsheets dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!