readgenbin

버전 1.0.0.0 (2.85 KB) 작성자: Cengiz Gunay
Reads a time-range of data from a binary GENESIS file.
다운로드 수: 200
업데이트 날짜: 2012/4/19

라이선스 보기

Usage:
[data, time_trace] = readgenbin(filename, start_time, end_time, endian);

Parameters:
filename: Path to GENESIS file.
start_time, end_time: Time in milliseconds relative to the ACTUAL
time of the experiment at which data adquisition started
(if you start gathering data at 200 ms and you specify 0
start time it will not work). If either is [] or NaN, defaults
to beginning and end of trace, respectively. end_time is
not inclusive.
endian: (optional) Indicates file format; 'l' for little endian
and 'b' for big endian. See the "machineformat" option
in fopen for more information. Defaults to the native endian
of this computer.

Returns:
data: Data vector or matrix read.
time_trace: (Optional) Corresponding time range vector (in ms).

Description:
Files should be created by the disk_out method in the GENESIS neural
simulator. No checking for binary type is made, so if you want reliability please
ensure the file is a binary. Files written by GENESIS on big-endian
machines (like old Mac and Solaris machines with PowerPC architecture)
must be loaded with the endian='b' option. There are sanity checks to
flag that the file may be reverse-endian, but this is not automatically
corrected.

Example:
Fully read a native-endian file:
>> dat = readgenbin('mydir/myfile.bin');
Specify a time range:
>> dat = readgenbin('mydir/myfile.bin', 100, 1000);
Get a time vector back:
>> [dat, t] = readgenbin('mydir/myfile.bin', 100, 1000);
>> figure; plot(t, dat);
Force to fully load big-endian Mac file on PC platform:
>> dat = readgenbin('mydir/mymacfile.bin', NaN, NaN, 'b');

See also: fopen

Author:
Alfonso Delgado-Reyes original version based in open
binary from Simon Peron.
Cengiz Gunay <cengique _AT_ users.sf.net> for error checking, verbose
output, endian support, and other minor modifications.

인용 양식

Cengiz Gunay (2024). readgenbin (https://www.mathworks.com/matlabcentral/fileexchange/36283-readgenbin), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2010b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Large Files and Big Data에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0