Hi all,
I have a text file with 10000 rows and 20000 columns as follows.
10101100100010110.... 10000111101101010.... ... I need to add spaces in between each digit and put the output into 10000 by 20000 array. How can I do it using Matlab?
Thanks.

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2015년 1월 11일
편집: Azzi Abdelmalek 2015년 1월 11일

0 개 추천

str=['1010';'0010';'1111']
out=str-'0'

댓글 수: 2

Charith
Charith 2015년 1월 11일
Hi, Thank you for your answer. But I need to read the digits from text file into Matlab before that. How could I do it? Thanks.
Stephen23
Stephen23 2015년 1월 11일
If you search this forum you will find hundreds (possibly thousands) of answers about how to read data from text files. Did you check any of them?
The Wiki is a good place to find information this kind of basic operation:

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

질문:

2015년 1월 11일

댓글:

2015년 1월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by