Gistlib Logo

gistlib

creata a matrix from 3 vectors so the vectors are in a column each in matlab

Assuming we have three column vectors a, b, and c, we can create a matrix M having a, b, and c as its columns using the following syntax:

main.m
M = [a, b, c]
14 chars
2 lines

This concatenates the three vectors a, b, and c horizontally to form a matrix M. Each vector becomes a column in the resulting matrix.

similar matlab code snippets

save ten vectors to matrix in matlab
how to call on a specific value in matlab
create a matrix of random 3-vectors that all have norm 1 in matlab
save ten vectotors 784x1 in martix 784x10 in matlab
how to change the diagonal of a matrix 3x3 with a vector with 3 elements in matlab
create a matrix of 3 vectors that all have norm 1 in matlab
create a matrix out of two vectors in matlab
given the matrix a = [ 1 -1 3; -1 2 5; 3 0 -4] and the vector b=[ 1; 0; -2], compute the column vector v storing the square of each element of the vector x in matlab
how to change the diagonal of a matrix 3x3 with a vector with 3 elements using a loop to create the vectorin matlab in matlab
how to calculate the left null space of a matrix in matlab

related categories

matrices
vectors
matlab

gistlibby LogSnag