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!