help me correct error
Ältere Kommentare anzeigen
%%Test Lempel-Ziv decoder lz_decode.m by decoding data in check.txt.lz
clear all;
% Read binary file, where first byte is used to
% indicate # zeros padded at the end
code = ReadBinFile('check.txt.lz');
% Decode file using lz_decode (to be written)
dec = lz_decode(code);
% Write result to output file. Here, no zero-padding will be performed!
WriteFile('check.txt.dec', dec);
i get this error
Error in ==> check at 6
code = ReadBinFile('check.txt.lz');
3 Kommentare
Adam
am 16 Nov. 2015
Is that the entire error message?
I would imagine it can't find the file 'check.txt.lz' without either it being on your path or being given a full path to the file, but it could also be that ReadBinFile is a function containing an error or one not found on the path. I assume the full error message would give a clear direction on which of these or something different it is.
Geoff Hayes
am 16 Nov. 2015
Maida - are there any more lines to the error that you observed (and if so could you copy and paste them to your question)? Is the ReadBinFile a function that you have written? Do you need to specify the path to the file check.txt.lz?
Maida Abbasi
am 17 Nov. 2015
Bearbeitet: Walter Roberson
am 17 Nov. 2015
Antworten (1)
Walter Roberson
am 17 Nov. 2015
At the MATLAB command line, give the command
dbstop if error
and run the program. When it stops, show us the complete error message that is output.
4 Kommentare
Maida Abbasi
am 17 Nov. 2015
Bearbeitet: Walter Roberson
am 17 Nov. 2015
Maida Abbasi
am 17 Nov. 2015
Bearbeitet: Walter Roberson
am 17 Nov. 2015
Walter Roberson
am 17 Nov. 2015
Shrug. I already told you what the problem was with this code. You did not listen then, so there is no reason to expect you would listen now.
Stephen23
am 17 Nov. 2015
Indeed Walter Roberson already gave an answer here:
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!