The stream is already open and cannot be reopened. Please call ''close'' and try again
The stream is already open and cannot be reopened. Please call ''close'' and try again
The stream is already open and cannot be reopened. Please call ''close'' and try again
Re: The stream is already open and cannot be reopened. Please call ''close'' and try again
Solution:
When you open a stream and try to open it again, you will see this error.
So check previous lines of your MATLAB code.
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).
For more information,
https://www.mathworks.com/help/matlab/ref/fwrite.html
https://www.mathworks.com/help/matlab/ref/fread.html
When you open a stream and try to open it again, you will see this error.
So check previous lines of your MATLAB code.
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).
For more information,
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 1 guest