필터 지우기
필터 지우기

Add string to matrix and other operations and then generate text file

조회 수: 2 (최근 30일)
Islam Hassan
Islam Hassan 2020년 7월 12일
댓글: SAA 2020년 7월 19일
I have matrix like the following and need to convert by adding strings inside it like the one on this figure:
I attached also excle fle for the orginal matrix and the reuseted mnatrix fomrat in another sheet in the same excle.
Can you help solving this challange by Matlab?

답변 (1개)

SAA
SAA 2020년 7월 19일
You can't put chars in a matrix you need to use a cell array for this, then do a cell2table and eventually to get a txt file do
writetable(YourTable,'YouNameIt.txt');
You also not make a table and just use fprirntf with fopene and fclose to save them as a txt file
Something = fopen('YouNameIt.txt');
fprintf(Something, ...); % you get the idea
fclose(Something);

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by