Your solution looks fine if out1 and out2 are row vectors, and OUTPUT1 and out1, and OUTPUT2 and out2 have the same number of columns. Did you have any other questions (otherwise you could have just deleted your question before anyone answered it if you solved it yourself)?
Best Answer