필터 지우기
필터 지우기

How to combine two data file in one file?

조회 수: 7 (최근 30일)
Durgendra
Durgendra 2024년 4월 2일
댓글: Mathieu NOE 2024년 4월 2일
I am trying to combine two data file. For example I have I data 2345 in one file and Q data -234 in second file and want to put together in one file in format 2345, -234
  댓글 수: 2
Jonas
Jonas 2024년 4월 2일
most often you can combine it. how exactl depends on the data files. please provide two exemplary data files
Durgendra
Durgendra 2024년 4월 2일
I have data generated from fromat below:
2756.00000000000 - 1252.00000000000i 2681.00000000000 - 992.000000000000i 2540.00000000000 - 679.000000000000i 2346.00000000000 - 330.000000000000i 2113.00000000000 + 37.0000000000000i 1860.00000000000 + 403.000000000000i 1602.00000000000 + 750.000000000000i 1357.00000000000 + 1058.00000000000i 1140.00000000000 + 1312.00000000000i 965.000000000000 + 1495.00000000000i
I am using below commond
IQ_data = data;
dlmwrite('IQ_data.txt', IQ_data, 'delimiter','\n')
I_data = real(IQ_data);
Q_data = imag(IQ_data);
Now how to combine data like below
2756,-1252
2681,-992
2540,-679
2346,-330
2113,37
1860,403
1602,750
1357,1058

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

채택된 답변

Mathieu NOE
Mathieu NOE 2024년 4월 2일
hello
try this :
IQ_data = [2756.00000000000 - 1252.00000000000i
2681.00000000000 - 992.000000000000i
2540.00000000000 - 679.000000000000i
2346.00000000000 - 330.000000000000i
2113.00000000000 + 37.0000000000000i];
I_data = real(IQ_data);
Q_data = imag(IQ_data);
writematrix([I_data Q_data], 'IQ_data.txt')
% plot data stored in file IQ_data.txt
type IQ_data.txt
2756,-1252 2681,-992 2540,-679 2346,-330 2113,37
  댓글 수: 2
Durgendra
Durgendra 2024년 4월 2일
Apriciate your response. It works
Mathieu NOE
Mathieu NOE 2024년 4월 2일
my pleasure !

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by