Tgspcread function error (line 323)
8 ビュー (過去 30 日間)
古いコメントを表示
I am attempting to use the tgspcread function in the Bioinformatics Toolbox to read a .spc file containing multiple spectra, but am receiving the following message. It had been working previous to updates to MATLAB, does anyone know how to solve it? Unfortunately my coding knowledge is pretty basic!
>> tgspcread('new.spc')
Reading header for file: new.spc
File contains 12826 scans
Insufficient number of outputs from right hand side of equal sign to satisfy assignment.
Error in tgspcread (line 323)
outputHeader.FileSize = dirInfo.bytes;
0 件のコメント
回答 (1 件)
Arthur Goldsipe
2019 年 2 月 12 日
I think this is a bug in how the function tries to find out the size of the SPC file. You will see this error if the file is located in a folder that was added to MATLAB's path. The function fopen that opens the file is able to locate files on the MATLAB path, but the function dir that gives file information does not find files on the MATLAB path.
One solution is to change your current working directory to the folder that contains the SPC file before running the command. Another solution would be to specify the relative or absolute path to the file when you call tgspcread. For example, if you're using Linux, and the file is in the /tmp folder, you could update your line of code to tgspcread('/tmp/new.spc').
8 件のコメント
Arthur Goldsipe
2019 年 2 月 15 日
Hi Ewan,
This is getting outside the scope of the original question, and it's a bit hard to follow along via comments. (It also makes it harder for other people with similar problems to find the solutions.) I recommend you make a new post in MATLAB Answers. If possible, I suggest attaching any relevant files so that other people can try to reproduce the problem.
-Arthur
参考
カテゴリ
Help Center および File Exchange で Bioinformatics Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!