Am I using this syntax correctly?

2 views (last 30 days)
Biza Ferreira
Biza Ferreira on 8 Oct 2012
I created the following code to obtain the results saved in various formats, am I doing it correctly.
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));
dataNow = datestr(now,'dd/mm/yyyy');
fwrite(ficheiro,'N. Imagem ','Nome Imagem','Data da Convers?ao');
fwrite(ficheiro,x,imgDir(x).name, dataNow);
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

Answers (2)

Image Analyst
Image Analyst on 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.

Biza Ferreira
Biza Ferreira on 9 Oct 2012
tanks, for answer the question , the problem is I write this code for save in each cell data ,but i dont understand what i am doing wrong


Community Treasure Hunt

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

Start Hunting!