Adding embedTimeseriesInMatrix and test harness