Grab filename with tdfread

2 views (last 30 days)
Brian
Brian on 24 Oct 2017
Commented: KL on 24 Oct 2017
I am using tdfread to open a file and assign variable names. Is there a way to pick off the filename when the selecting the file? I would like to add the file name to the title of a plot.
Thanks.
Brian

Answers (2)

KL
KL on 24 Oct 2017
Edited: KL on 24 Oct 2017
use
filename = uigetfile
then for the title of the plot,
title(filename)
  5 Comments
per isakson
per isakson on 24 Oct 2017
Edited: per isakson on 24 Oct 2017
It seems you have to do something like
filename = uigetfile
tdfread ( filename )
if you want to use tfdread
KL
KL on 24 Oct 2017
Exactly

Sign in to comment.


Brian
Brian on 24 Oct 2017
Thanks! This was it.

Categories

Find more on Resizing and Reshaping Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!