>> s16 = serial('COM16', 'BaudRate', 9600);
>> fopen(s16)
>> fprintf(s16, 'aaaa');
>> fprintf(s16, 'bbbb');
>> idn = fscanf(s16)
Warning: A timeout occurred before the Terminator was reached.
idn =
456
>> idn = fscanf(s16)
Warning: A timeout occurred before the Terminator was reached.
idn =
''
>> idn = fscanf(s16)
Warning: A timeout occurred before the Terminator was reached.
idn =
789
>> fopen(s16)
??? Error using ==> serial.fopen at 71
OBJ has already been opened.
>> fclose(s16)
>>
>> fopen(s16)
>> fprintf(s16, 'aaaa');
>> fprintf(s16, 'bbbb');
>> idn = fscanf(s16)
Warning: A timeout occurred before the Terminator was reached.
idn =
456
>> idn = fscanf(s16)
Warning: A timeout occurred before the Terminator was reached.
idn =
''
>> idn = fscanf(s16)
Warning: A timeout occurred before the Terminator was reached.
idn =
789
>> fopen(s16)
??? Error using ==> serial.fopen at 71
OBJ has already been opened.
>> fclose(s16)
>>