Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Topic: Making a square matrix from two vector
Replies: 22   Last Post: Mar 19, 2013 12:37 AM

 Search Thread: Advanced Search

 Messages: [ Previous | Next ]
 james bejon Posts: 219 Registered: 3/13/10
Re: Making a square matrix from two vector
Posted: Feb 8, 2013 5:40 PM
 Plain Text Reply

% Data
a = [1 2 3 4];
b = [1 2 4 5].';

% Engine
X = (b * a) + bsxfun(@plus, a, b);

% And if you insist?
X(1, :) = a;
X(:, 1) = b;

Date Subject Author
2/8/13 Jerry
2/8/13 Barry Shaw
2/8/13 dpb
2/8/13 james bejon
2/9/13 Bruno Luong
2/9/13 james bejon
2/9/13 Bruno Luong
2/12/13 james bejon
2/12/13 Steven Lord
2/12/13 Bruno Luong
2/12/13 dpb
2/12/13 Bruno Luong
2/12/13 dpb
2/13/13 Bruno Luong
2/13/13 dpb
2/14/13 Bruno Luong
2/14/13 dpb
2/14/13 Bruno Luong
2/14/13 dpb
2/14/13 dpb
2/13/13 james bejon
3/18/13 James
3/19/13 Bruno Luong

© The Math Forum at NCTM 1994-2016. All Rights Reserved.