Borrar filtros
Borrar filtros

Attempting to open a script to analyze a PTU file

12 visualizaciones (últimos 30 días)
Jose Godinez
Jose Godinez el 20 de Jun. de 2019
Comentada: abdul kalam el 10 de Mayo de 2021
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!

Respuesta aceptada

Geoff Hayes
Geoff Hayes el 20 de Jun. de 2019
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 comentarios
Jose Godinez
Jose Godinez el 26 de Jun. de 2019
I think this worked. Thank you!
abdul kalam
abdul kalam el 10 de Mayo de 2021
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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by