! Genereazas matricile A si b
subroutine genAB(n, nb, A, b)

real a(n,n), b(n,nb)
real x(n), y(n)

a =0.; 
b =0.;

! Insereaza cod
! Exemplu:
! do i=1,n
!	do j=1,n
!	a(i,j) =...
!	enddo
! enddo
!
! do j=1,nb
!	do i=1,n
!	b(i,j) =...
!	enddo
! enddo

! A= Hilbert:
!ido: do i =1,n
!jdo: do j =1,n
!a(i,j) =real( (i+j-1) )
!enddo jdo
!enddo ido

! Wilkinson 5:
!  do i = 1, 5
!    do j = 1, 5
!    a(i,j) = 1.8144/(i +j +1 )
! *10:
!    a(i,j) = 18.144/(i +j +1 )

! *20:
!    a(i,j) = 36.288/(i +j +1 )
!
!    end do
!  end do


!b =0.


! CAUCHY
! n =5
!x =(/1, 3, 5, 7, 9/)
!y =(/2, 4, 6, 8, 10/)

!do i =1,n
!do j=1,n
!      a(i,j) = 1./(x(i) + y(j))
!enddo
!enddo

! b =Vectorii unitate:
do j =1,nb
do i=1,n
b(i,i) =1.
enddo
enddo

! A= Hilbert; Solutia 1,1,..,1
ido: do i =1,n
jdo: do j =1,n
a(i,j) =real( (i+j-1) )
enddo jdo
enddo ido

!a =1./a

!nb =1

!do i=1,n
!b(i,1) =sum(a(i,:))
!enddo


END subroutine GenAB
