increment row in excel from matlab script

조회 수: 1 (최근 30일)
Deepan Muthusamy
Deepan Muthusamy 2021년 7월 7일
답변: Johannes Hougaard 2021년 7월 7일
i want a matrix [1x5], i want to write this into an excel sheet in the following pattern,
the [1x5] should repeat 256 times in the row and also should repeat 256 times in column.
Basically i want a [256x256] matrix of [1x5] matrix. i dont know how to increment the row row and column number.
  댓글 수: 2
Image Analyst
Image Analyst 2021년 7월 7일
Are you saying you want a 1x5 vector of numbers to all be inside a single cell of the spreadsheet?
Deepan Muthusamy
Deepan Muthusamy 2021년 7월 7일
i want 1x5 in 5 cells and this pattern should repeat for 256 times

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

채택된 답변

Johannes Hougaard
Johannes Hougaard 2021년 7월 7일
I think the easiest would be to keep your matrix in MATLAB and make the large matrix in MATLAB before writing the Excel sheet.
the_matrix = randn(1,5);
the_pattern = repmat(the_matrix,256,256);
writematrix(the_pattern,"thisisanexcelfile.xlsx");

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by