Tuesday, July 21, 2009

Matlab - Add a new cell

If you know in advance how many results you will generate you can use:

c = cell(1, 100);
for i = 1:100
% code that generates v
c{i} = v;
end

if not then you can use:

c = {};
% "some for loop here that creates v"
c{end+1} = v;
end

Saturday, July 11, 2009

.NET - How to find the index of a datarow

int position = DataTable.Rows.IndexOf(DataRow);