Octave silently downcasts doubles to ints in some cases
My answers for a recent homework assignment were wrong because octave silently downcasts doubles to ints in some
cases. Specifically when constructing a matrix from one vector of doubles and one vector of ints.
for example:
> doubles = [1.01; -0.01];
> ints = [int32(10); int32(0)];
> ints = [int32(10); int32(0)];
> [doubles ints]
ans =
ans =
1 10
0 0
0 0
Just a PSA.