Attempting to open a script to analyze a PTU file

5 ビュー (過去 30 日間)
Jose Godinez
Jose Godinez 2019 年 6 月 20 日
コメント済み: abdul kalam 2021 年 5 月 10 日
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!

採用された回答

Geoff Hayes
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 件のコメント
Jose Godinez
Jose Godinez 2019 年 6 月 26 日
I think this worked. Thank you!
abdul kalam
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 ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by