Watermarking

I am doing a project in digital watermarking. Currently I need to know the available methods to convert a text file(.txt extension) into a stream of bits(1s and 0s). Is there any function in Matlab to perform this operation or should I try any alternative method?? Pls help me soomeone.......

Respuestas (1)

Titus Edelhofer
Titus Edelhofer el 27 de Sept. de 2011

0 votos

Hi,
just read in the file as bits:
% open the file
fid = fopen('yourfile.txt', 'rt');
% read as unsigned 1 bit data:
data = fread(fid, '*ubit1');
% done:
fclose(fid);
Titus

Etiquetas

Preguntada:

el 27 de Sept. de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by