Please format this code..?
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
function [] = myFunction(imageNumber)
I = imread(sprintf('%d.png',imageNumber));
threshold = graythresh(I);
originalImage = im2bw(I, threshold);
i = bwareaopen(originalImage,350);
m = max(max(i));
[r c] = find(i == m);
fid = fopen(sprintf('Image%d_lalit1.txt',imageNumber),'wt');
for j=1:length(r),
fprintf(fid,'%f %f\n',r(j),c(j));
end
fclose(fid);
data = textread(sprintf('Image%d_lalit1.txt',imageNumber));
r = unique(data);
for i=r',
c = data(data(:,2)==i,1);
z(i,1) = mean([min(c) max(c)]);
end
fid = fopen(sprintf('patil%d.txt',imageNumber),'wt');
for j=1:length(z),
fprintf(fid,'%f %f\n',j,z(j));
end
data = textread(sprintf('patil%d.txt',imageNumber));
data(data(:,2) > 279, :) = [];
.......................................................................................................................................................
and now i want to save this files, so, what will be the last line of this function..?
I my self, first asked the question, then i was unclear about this so, i deleted it, now i again stucked so, i asked this as new question..
5 件のコメント
TAB
2012 年 12 月 6 日
Nothing
*OR *
end
Lalit Patil
2012 年 12 月 6 日
編集済み: Lalit Patil
2012 年 12 月 6 日
José-Luis
2012 年 12 月 6 日
Please format your post properly. It will make it easier for people to help you.
Jan
2012 年 12 月 6 日
Who has changed the title of this question to "please format this code...?"?
Lalit Patil
2012 年 12 月 7 日
回答 (1 件)
Muruganandham Subramanian
2012 年 12 月 6 日
編集済み: Muruganandham Subramanian
2012 年 12 月 6 日
0 投票
Use 'diary' command
0 件のコメント
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!