tdmsreadprop
Description
Examples
Read the file level properties of a TDMS file.
props = tdmsreadprop("Turbine_003.tdms")
props = 1×7 table name title author description datetime datestring timestring _____________ _______________ ______ ____________________________________________________ _____________________________ ____________ __________ "Turbine_003" "Turbine Tests" "xyz" "Test the Acceleration, Force and Torque of Turbine" 2021-10-18 01:57:17.000000000 "10/18/2021" "11:27:17"
Read the properties of one channel group.
props = tdmsreadprop("Turbine_003.tdms",ChannelGroupName="Torque")
props = 1×2 table name description ________ ___________ "Torque" "CGTorque"
Narrow the scope to view properties specific to a channel. Note that in this case, a channel has more properties than its channel group does.
props = tdmsreadprop("Turbine_003.tdms",ChannelGroupName="Torque",ChannelName="Torque2")
props = 1×19 table name datatype description unit_string displaytype monotony novaluekey ResultStatArithMean ResultStatMax ResultStatMin ResultStatSqrMean ResultStatSum wf_increment wf_samples wf_start_offset wf_start_time wf_time_pref wf_xname wf_xunit_string _________ ___________ ________________ ___________ ___________ ________________ ________________ ___________________ _____________ _____________ _________________ _____________ ____________ __________ _______________ _____________________________ ____________ ________ _______________ "Torque2" "DT_DOUBLE" "from Clipboard" "Nm" "Numeric" "not calculated" "not calculated" -6.7843e-06 1.4651 -1.6662 0.12794 -2.2049 0.0001 3312 0 2012-07-31 18:00:00.000000000 "relative" "Time" "s"
Filter on specific properties of the file.
props = tdmsreadprop("Turbine_003.tdms",PropertyNames=["name" "title" "author" "description"])
props = 1×4 table name title author description _____________ _______________ ______ ____________________________________________________ "Turbine_003" "Turbine Tests" "xyz" "Test the Acceleration, Force and Torque of Turbine"
Retrieve the start time and step period for a channel.
props = tdmsreadprop("Turbine_003.tdms",ChannelGroupName="Torque",ChannelName="Torque2",... PropertyNames=["wf_start_time" "wf_increment"])
props = 1×2 table wf_increment wf_start_time ____________ _____________________________ 0.0001 2012-07-31 18:00:00.000000000
You can derive the sample rate by taking in the inverse of the
wf_increment
value.
rate = 1/props{1,"wf_increment"}
rate = 10000
Input Arguments
TDMS file name, specified as a string.
For local files, use a full or relative path that contains a file name and extension. You also can specify a file on the MATLAB® path.
For Internet files, specify the URL. For example, to read a remote file from the Amazon S3™ cloud:
data = tdmsread("s3://bucketname/path_to_file/data.tdms");
Example: "airlinesmall.tdms"
Data Types: char
| string
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: ChannelGroupName="Torque",ChannelName="Torque2"
Supported name-value pairs are:
Channel group containing the channels to read from, specified as a string or character vector.
Example: ChannelGroupName="Torque"
Data Types: string
| char
Name of channel to read, specified as a string or character vector. The channel
must be in the channel group specified by ChannelGroupName
.
Example: ChannelName="Torque2"
Data Types: char
| string
Property names to read, specified as a string, string array, character vector, or cell array of character vectors. Supported properties depend upon file content and the specified channel group and channels.
Example: PropertyNames=["name" "description"
"wf_start_time"]
Data Types: char
| string
| cell
Output Arguments
Properties in the TDMS file, returned as a table.
Limitations
TDMS functions are supported on Windows® platforms only.
Version History
Introduced in R2022a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)