read text file to get complex number
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi all, I have a data of vector from 1:1000 saved in REAL_I.text file another vector from 1:1000 saved in IMAG_Q.text file. how can i read them to get complex_IQ=real + j*imag. (vector numbers like this 5e-011 0.000225206230). thanks in advance
댓글 수: 0
답변 (1개)
John D'Errico
2024년 3월 3일
편집: John D'Errico
2024년 3월 3일
Read the files in as two vectors. There are many tools that can read a text file.
Then add them, multiplying the second by sqrt(-1).
r = rand(1,3)
im = rand(1,3)
r + sqrt(-1)*im
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!