How can i add new value into next row in excel?
5 ビュー (過去 30 日間)
古いコメントを表示
im working with color feature extraction ..and i have 27 color type..i was created the gui to extract color feature from image and store those value to excel..i have 2 rows and 27 columns ..first row is header (title)..second row is value of header..but whenever i run the gui with new image it will always overwrite the values from C4 cells to AC4..
i want to make it whenever i run the gui ,browse image and extract colour feature ..it will store in excel and fill in next row (for example C5 to AC 5,run GUI again fill to C6 to AC6,run GUI again fill to C7 to AC 7 etc)
i have no idea with that..please anybody help me..
0 件のコメント
回答 (1 件)
Jakob B. Nielsen
2020 年 2 月 17 日
A simple solution: define a counter file that pertains to your GUI - lets call it rownumber. Save it manually the first time, to be rownumber=4; for example. Then:
rownumber=load('insertpathhere.mat');
myranges=['A',num2str(rownumber),':AC',num2str(rownumber)];
%code code code
%then, in the end:
rownumber=rownumber+1;
save('insertpathhere.mat','rownumber');
2 件のコメント
Nur Syarah Hani Ahmad Fitri
2020 年 5 月 16 日
hey jakob i think i got the idea of your solution but i cant manage to apply in my code
meanpca1= mean(mean(pca1Image,1),2);
meanpca2= mean(mean(pca2Image,1),2);
meanpca3= mean(mean(pca3Image,1),2);
d = {'PCA 1','PCA 2', 'PCA 3'; meanpca1, meanpca2, meanpca3};
filemeanpca=xlswrite('filemeanpca.xlsx',d);
so the first row i did it like this then so it worked and if if i repeat this method it will overwrite the current value so i basically wanted meanpca1, meanpca2, meanpca3 will insert into a new row every time i want to run a different images so that i can keep track the data.
im currently using matlab r2016a
参考
カテゴリ
Help Center および File Exchange で Data Import from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!