MATLAB: Storing a vector as a row of a matrix

matrix manipulation

How would one store different vectors as different rows of a matrix?
eg in this case
for ii=1:16
A(ii)=0;
C(ii)=0;
for jj=1:4
for kk=1:8
A(ii)=A(ii)+hd(jj)*delta_edp(ii,jj,kk);
Ae(ii,:)=A(ii);
X(ii,:)= X_dp(jj,kk);
X(ii,:)=ro_max;
Aeq(ii,:)=Ae(ii)*X(ii);
end
end

Best Answer

N = 12;
x = rand(1,N);
y = rand(1,N);
z = rand(1,N);
A = [ x ; y ; z ] ;
Related Question