필터 지우기
필터 지우기

how to use XLSWRITE function in the forloop?

조회 수: 1 (최근 30일)
hp
hp 2017년 6월 10일
편집: Walter Roberson 2017년 6월 11일
how to use xlswrite function in the for loop ,allowing for loop to write data into excel sheet in every iteration of the for loop.
syntax of xlswrite for specifying the range is given as follows,but how to specify the row range ,(if using for loop)
xlswrite(filename, M, 'range')
writes matrix M to a rectangular region specified by range in the first worksheet of the file filename. Specify range using one of the following quoted string formats:A cell designation, such as 'D2', to indicate the upper left corner of the region to receive the matrix data.Two cell designations separated by a colon, such as 'D2:H4', to indicate two opposing corners of the region to receive the matrix data.
The range 'D2:H4' represents the 3-by-5 rectangular region between the two corners D2 and H4 on the worksheet.
  댓글 수: 1
hp
hp 2017년 6월 11일
편집: Walter Roberson 2017년 6월 11일
THANK YOU SO MUCH ....
ITS WORKING..
filename = 'C:\Program Files\MATLAB\R2007b\work\colorfeatures{j}.xlsx';
xlswrite(filename,colorMoments(1, :),'sheet1',['A' num2str(j) ':' 'F' num2str(j)]);

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

답변 (1개)

Walter Roberson
Walter Roberson 2017년 6월 10일
You can use dec2base27() from the File Exchange to convert numeric columns into Excel column letter notation.
  댓글 수: 1
hp
hp 2017년 6월 10일
but how to specify the row range.. i have 12 images ... the extracted features of each image is 6 values ... i need to store 12 rows of values in same excel sheet , every time 'forloop' computes the features and it should store each feature in 1 to 12 rows of same sheet . how to do it.. highlighted area of the below image shows the row range... but for loop is unable to upload 12 rows of data into same excel sheet.how to do it.

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

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by