.let format binary file

조회 수: 3 (최근 30일)
NGR MNFD
NGR MNFD 2021년 8월 7일
댓글: NGR MNFD 2021년 8월 9일
Greetings and Regards
I have a .txt binary(force signal from left and right foot for example ) I want to know how to add it to the properties column(For example, columns 14 and 15 properties? thanks

채택된 답변

Image Analyst
Image Analyst 2021년 8월 7일
Try this (untested) to insert your values into columns 14 and 15 of the file:
% Open the file for reading in text mode.
inputFileID = fopen(fullInputFileName, 'rt');
% Open the output file for writing in text mode.
fullOutputFileName = 'Delete me.txt'; % Some temporary name
outputFileID = fopen(fullInputFileName, 'wt');
% Read the first line of the file.
textLine = fgetl(inputFileID);
lineCounter = 1;
while ischar(textLine)
% Print out what line we're operating on.
fprintf('%s\n', textLine);
% Read the next line.
textLine = fgetl(inputFileID);
% Insert binary values into columns 14 and 15.
outputTextLine = [textLine(1:13), binaryValue1, binaryValue2, textLine(14:end)];
% Write it out to the output file.
fprintf(outputFileID, '%s\n', textLine);
lineCounter = lineCounter + 1;
end
% All done reading all lines, so close the file.
fclose(inputFileID);
fclose(outputFileID);
% Copy new one over old one.
recycle on; % Recycle rather than delete permanently.
delete(fullInputFileName); % Delete old input file.
copyfile(fullInputFileName, fullOutputFileName); % Make new one have the same name.
delete(fullOutputFileName); % Delete temporary file.
  댓글 수: 13
NGR MNFD
NGR MNFD 2021년 8월 9일
I do not know where to find out that what column of the current file would have the key information "control14" that is needed to match against. and i don not khnow what you say ?
The only thing I know about the main feature information is the 13 feature columns I mentioned in .ts files.
for example this is file about control14.ts that have 249*13 .I want to add control14.let in column 14 and control14.rit in column 15.
NGR MNFD
NGR MNFD 2021년 8월 9일
I have just the .rit and .let file in binary format and i get the other features from .ts file .I want to convert .let, .rit files to non-binary format and put them in columns 14 and 15 along with other features.dear walter You understand what I mean??

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by