// note the difference between equ(a,b) which
// creates the matrix a whereas elm(a,b) assert
// compatible dimensions of a and b: if a is (m,n)
// then b can be (m,n) (m,1) (1,n) or (1,1)
program elm1;
uses mtx09;
var
  a, b: mtx;
begin
  equ(a,'1 2 3; 4 5 6'); // create and assign a
  equ(b,a);              // create and assign b
  mwr(b);
  elm(col(a,1),1/3);     // modify 1st col. of a
  mwr(a);
  elm(lgn(a,2,3),1/4);   // modify rows 2..3 of a
  mwr(a);
  elm(dia(a),0);         // modify diagonal elem.
  mwr(a);
  elm(a,b);              // a(i,j)=b(i,j) for all i,j
  elm(b,0.0);            // b(i,j) = 0 for all i,j
end.
