help me correct error
Mostra commenti meno recenti
%%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 Commenti
Adam
il 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
il 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
il 17 Nov 2015
Modificato: Walter Roberson
il 17 Nov 2015
Risposte (1)
Walter Roberson
il 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 Commenti
Maida Abbasi
il 17 Nov 2015
Modificato: Walter Roberson
il 17 Nov 2015
Maida Abbasi
il 17 Nov 2015
Modificato: Walter Roberson
il 17 Nov 2015
Walter Roberson
il 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
il 17 Nov 2015
Indeed Walter Roberson already gave an answer here:
Categorie
Scopri di più su Logical in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!