Attempting to open a script to analyze a PTU file
조회 수: 5 (최근 30일)
이전 댓글 표시
Hello everyone, I am currently trying to analyze a PTU file called "c3_c5_DNA_1.ptu" using a script provided to me called "Read_PTU_V1". I have no experience programming in MatLab and limited experience in other languages. I have tried modifying the parts of the script I believe I need to edit to make it work, but I've been unsuccessful up to the moment. The following lines correspond to the parts of the script I believe need to be modified. The only changes I made are adding the path of the files to where I believed the script needed them. I have attached copies of those two sections for reference.
Original Script:
function [output, txtout]=(filepath) % Read PicoQuant Unified TTTR Files
My Change:
function [output, txtout]=('C:\Users\jgodinez6\Desktop\Read_PTU_V1') % Read PicoQuant Unified TTTR Files
Another section (original):
fid=fopen(filepath);
My change:
fid=fopen('C:\Users\jgodinez6\Desktop\c3_c5_DNA_1.ptu');
This is the error I get when I try to run it:
>> Read_PTU_V1
Error: File: Read_PTU_V1.m Line: 1 Column: 39
Unexpected MATLAB expression.
I will really appreciate your support. Thank you!
댓글 수: 0
채택된 답변
Geoff Hayes
2019년 6월 20일
Jose - the problem is with the signature of this function
function [output, txtout]=(filepath)
While you are providing the input and output parameter names, you are not supplyinbg a function name. See Declare function name, inputs, and outputs for details on how to do this. In your case, you would do something like
function [output, txtout] = myFunction(filepath)
and save this to a file myFunction.m. This is an example only...you can name it to be whatever you want but the function name must match the file name.
You would then call this function from the command line (or another script or function) as
>> [output, txtout] = myFunction('C:\Users\jgodinez6\Desktop\Read_PTU_V1')
where you pass in the path and name of the function that you want to process. Since you are passing in this string, then this is the value of the filepath input parameter, and so the line to open the file can still remain as
fid=fopen(filepath);
댓글 수: 4
abdul kalam
2021년 5월 10일
Hi
I am using the matlab function Read_PTU_V1 (filepath) written by Omri Bar-Elli to read a .ptu file recorded with Picoharp260 in T3 mode. Please see the link attched for the reference (https://www.mathworks.com/matlabcentral/fileexchange/61789-read_ptu_v1-filepath).
While using the function, I am getting an error as "Illegal RecordType!"
Can someone help me in reading the file complaetely?
Thank you very much in advance.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!