The stream is already closed
The stream is already closed
The stream is already closed
Re: The stream is already closed
Solution:
When you close a strem and try to open it again, you will see this error.
So check previous lines of your MATLAB code.
For more information,
A = fread(fileID) reads data from an open binary file into column vector A and positions the file pointer at the end-of-file marker. The binary file is indicated by the file identifier, fileID. Use fopen to open the file and obtain the fileID value. When you finish reading, close the file by calling fclose(fileID).
fwrite(fileID,A) writes the elements of array A as 8-bit unsigned integers to a binary file in column order. The binary file is indicated by the file identifier, fileID. Use fopen to open the file and obtain the fileID value. When you finish writing, close the file by calling fclose(fileID).
https://www.mathworks.com/help/matlab/ref/fwrite.html
https://www.mathworks.com/help/matlab/ref/fread.html
When you close a strem and try to open it again, you will see this error.
So check previous lines of your MATLAB code.
For more information,
A = fread(fileID) reads data from an open binary file into column vector A and positions the file pointer at the end-of-file marker. The binary file is indicated by the file identifier, fileID. Use fopen to open the file and obtain the fileID value. When you finish reading, close the file by calling fclose(fileID).
fwrite(fileID,A) writes the elements of array A as 8-bit unsigned integers to a binary file in column order. The binary file is indicated by the file identifier, fileID. Use fopen to open the file and obtain the fileID value. When you finish writing, close the file by calling fclose(fileID).
https://www.mathworks.com/help/matlab/ref/fwrite.html
https://www.mathworks.com/help/matlab/ref/fread.html
Who is online
Users browsing this forum: No registered users and 10 guests