reset
Syntax
Description
reset(
resets the VITA 49 file
reader to the first VITA 49 packet of the file. This function resets the number of signal
data and context packets traversed to zero.vita49ReaderObj
)
Examples
Reset VITA 49 File Reader
Create a VITA 49 file reader object, specifying the name of a VITA 49 file.
vita49ReaderObj = vita49Reader("VITA49SampleData.bin");
Specify the number of packets to be read.
numpkt = 4;
Read the specified number of packets to the MATLAB® workspace.
[signalDataPacket,contextPacket,contextPacketChangeIndex] = read(vita49ReaderObj,NumPackets = numpkt);
Display the number of packets read by the object. Because you specified for the function to read 4 packets, the number of packets read is 4
.
numPacketsRead = vita49ReaderObj.PacketsRead
numPacketsRead = 4
Reset the position of the VITA 49 file reader to the first packet of the VITA 49 file.
reset(vita49ReaderObj);
Display the number of packets read by the object. Since the reset
object function resets the position of the file reader object to the first VITA 49 packet of the file, the value reflects 0
packets read. Read a packet from the object..
numPacketsRead1 = vita49ReaderObj.PacketsRead
numPacketsRead1 = 0
[signalDataPacket1,contextPacket1,contextPacketChangeIndex1] = read(vita49ReaderObj);
Display the number of packets read. Because you did not specify a number of packets to read, only the first packet of the VITA 49 file has been read.
numPacketsRead2 = vita49ReaderObj.PacketsRead
numPacketsRead2 = 1
Clear the vita49Reader
System object.
clear vita49ReaderObj
Input Arguments
vita49ReaderObj
— VITA 49 file reader
vita49Reader
object
VITA 49 file reader, specified as a vita49Reader
object.
Version History
Introduced in R2022b
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.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)