I have matrix A that contains values and I like to add to this matrix the minimum,average and maximun of gabor filter(function call). I write new file 'fid "and I put in the first time the first line of matrix A then I have added the three variables (max,mean,min) until the end of matrix A please if error helps me to solve it and thank you in advance
filename=['new_' dbstr.varr{k} '.txt'];
fid = fopen(filename,'wt');
for i=1:size(no_of_frame,1)
img= read(mov, no_of_frame(i)); % get this from video
gaborArray = gaborFilterBank(5,8,39,39);
featureVector = gaborFeatures(img,gaborArray,4,4);
val= max(featureVector);
val1= min(featureVector);
val2= mean(featureVector);
fprintf(fid,'%g\t',A(i,:));
fprintf(fid,'%g\t', '%g\t', '%g\t',val,val1,val2);
end

댓글 수: 2

Image Analyst
Image Analyst 2016년 3월 15일
I don't know what "please if error helps me to solve it" means. Errors can help you or us to solve it, but only if we know what the errir is. You forgot to post it. Maybe you ran this twice and got an error because you never called fclose() - we don't know. Please copy and paste any and all RED TEXT that you see.
emna massoudi
emna massoudi 2016년 3월 15일
편집: emna massoudi 2016년 3월 15일
when I add the 3 variable (val, val1, val2) get for me this error " Error using ==> vertcat arguments dimensions are not consistent " because after the add i load the file fid in matrix and i sum all the matrix for all video the error give for this code when i put it because after the add i haven't any error and i called fclose()

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Function Creation에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

질문:

2016년 3월 15일

편집:

2016년 3월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by