help me correct error
显示 更早的评论
%%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 个评论
Adam
2015-11-16
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
2015-11-16
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
2015-11-17
编辑:Walter Roberson
2015-11-17
回答(1 个)
Walter Roberson
2015-11-17
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 个评论
Maida Abbasi
2015-11-17
编辑:Walter Roberson
2015-11-17
Maida Abbasi
2015-11-17
编辑:Walter Roberson
2015-11-17
Walter Roberson
2015-11-17
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
2015-11-17
Indeed Walter Roberson already gave an answer here:
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!