[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63415] Error in fwrite() or rand() or randn()
From: |
Arun Giridhar |
Subject: |
[Octave-bug-tracker] [bug #63415] Error in fwrite() or rand() or randn(), I'm not sure |
Date: |
Fri, 25 Nov 2022 07:24:07 -0500 (EST) |
Update of bug #63415 (project octave):
Status: None => Works For Me
_______________________________________________________
Follow-up Comment #2:
Works for me with both default and stable:
GNU Octave Version: 8.0.1 (hg id: fa254b08f949)
GNU Octave Version: 9.0.0 (hg id: ce5b4a00b022)
I expanded your test like this.
clear all
fid = fopen ("m_eye.bin", "wb", "ieee-le");
matA = eye (100,150);
n = fwrite (fid, matA, "double");
fclose(fid);
assert (stat ("m_eye.bin").size == numel(matA) * 8)
fid = fopen ("m_rand.bin", "wb", "ieee-le");
matB = rand (100,150);
n = fwrite (fid, matB, "double");
fclose(fid);
assert (stat ("m_rand.bin").size == numel(matB) * 8)
fid = fopen ("m_eye.bin", "rb");
matC = fread (fid, inf, "double");
fclose(fid);
fid = fopen ("m_rand.bin", "rb");
matD = fread (fid, inf, "double");
fclose(fid);
assert (all (matC == matA(:)))
assert (all (matD == matB(:)))
clear ans fid
whos
It passes all assertions for me and the file sizes are 120000 bytes each.
What OS are you running on? Is it on a local disk or a network drive? (Not
sure if it would make a difference, but it's good to rule out disk caching
interference.)
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63415>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #63415] Error in fwrite() or rand() or randn(), I'm not sure, José Luis García Pallero, 2022/11/25
- [Octave-bug-tracker] [bug #63415] Error in fwrite() or rand() or randn(), I'm not sure, José Luis García Pallero, 2022/11/25
- [Octave-bug-tracker] [bug #63415] Error in fwrite() or rand() or randn(), I'm not sure,
Arun Giridhar <=
- [Octave-bug-tracker] [bug #63415] Error in fwrite() or rand() or randn(), I'm not sure, Arun Giridhar, 2022/11/25
- [Octave-bug-tracker] [bug #63415] Error in fwrite() or rand() or randn(), I'm not sure, José Luis García Pallero, 2022/11/25
- [Octave-bug-tracker] [bug #63415] Error in fwrite() or rand() or randn(), I'm not sure, Arun Giridhar, 2022/11/25
- [Octave-bug-tracker] [bug #63415] Error in fwrite() or rand() or randn(), I'm not sure, Arun Giridhar, 2022/11/25
- [Octave-bug-tracker] [bug #63415] Error in fwrite() or rand() or randn(), I'm not sure, José Luis García Pallero, 2022/11/25
- [Octave-bug-tracker] [bug #63415] Error in fwrite() or rand() or randn(), I'm not sure, Arun Giridhar, 2022/11/25
- [Octave-bug-tracker] [bug #63415] Error in fwrite() or rand() or randn(), I'm not sure, José Luis García Pallero, 2022/11/25
- [Octave-bug-tracker] [bug #63415] Error in fwrite() or rand() or randn(), I'm not sure, Arun Giridhar, 2022/11/26
- [Octave-bug-tracker] [bug #63415] Error in fwrite() or rand() or randn(), I'm not sure, José Luis García Pallero, 2022/11/26
- [Octave-bug-tracker] [bug #63415] Error in fwrite() or rand() or randn(), I'm not sure, Dmitri A. Sergatskov, 2022/11/26