Skip to content

Instantly share code, notes, and snippets.

View KubaO's full-sized avatar

Kuba Sunderland-Ober KubaO

View GitHub Profile
// complete compileable example begins
#include <assert.h>
#include <math.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
@KubaO
KubaO / coltextread.m
Last active February 16, 2018 14:02
An Octave universal delimited file cell reader.
## Author: voithos on so
## Url: https://stackoverflow.com/a/8319848/1329652
function varargout = coltextread(fname, delim)
% Initialize the variable output argument
varargout = cell(nargout, 1);
% Initialize elements of the cell array to nested cell arrays
% This syntax is due to {:} producing a comma-separated
[varargout{:}] = deal(cell());