/
proof-of-concept
/
audio-spike-sorting
Jump to
/
Appearance
Match my system
Paper
GitHub
Slate
Midnight
Terminal
Sign in
proof-of-concept
/
audio-spike-sorting
Code
Commits
Issues
0
Pull requests
0
Actions
Branches
1
Tags
0
Site
16328b9
Branches
main
audio-spike-sorting
/
src
/
export
/
assets
/
load_csv.m
10 lines · 256 B
Copy
Copied
Blame
History
Raw
1
function m = load_csv(path, ncols)
2
% Read a headerless numeric CSV with ncols columns into a matrix.
3
s = strtrim(fileread(path));
4
if
isempty(s)
5
m = zeros(
0
, ncols);
6
return
;
7
end
8
v = sscanf(regexprep(s,
','
,
' '
),
'%f'
);
9
m = reshape(v, ncols, []).
';
10
end
11
↑
↓
move
↵
open
esc
close