Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by milenko76

  1. milenko76

    allocatable arrays problem!

    I have manage to solve the problem,mikrom you were right it was issue of initialiasing dist_ik.
  2. milenko76

    allocatable arrays problem!

    module def implicit none integer :: i,j,k,a,n,c real, dimension(:), allocatable, target :: work_s real, dimension(:), allocatable, target :: work_p real, dimension(:), allocatable, target :: pp real, dimension(:), pointer:: ptr_pp real...
  3. milenko76

    allocatable arrays problem!

    No,it gives me the same message again.The code now: program pr7 use def implicit none real :: func real(kind(1d0)) getvalue open(10,file='pch.dat',status='old') open(11,file='cl.dat',status='old') open(12,file='lj.dat',status='old') open(14,file='b.dat',status='old') read(10,*)n,c...
  4. milenko76

    allocatable arrays problem!

    program pr7 use def use face implicit none real :: func open(10,file='pch.dat',status='old') open(11,file='cl.dat',status='old') open(12,file='lj.dat',status='old') open(14,file='b.dat',status='old') read(10,*)n,c a=n*c allocate(x(n,c)) allocate(pp(a)) do i=1,n...
  5. milenko76

    allocatable arrays problem!

    I got this: Subscript #2 of the array X has value 3 which is greater than the upper bound of 2 How to set up bounds? integer :: i,j,k,c,n,a real,dimension(:,:),allocatable :: x Then comes main program: read(10,*)n,c a=n*c allocate(x(n,c)) Reads 4,2 but latter...
  6. milenko76

    fortran 90 only

    Just to make clear:I need whole nrtype to complile?
  7. milenko76

    fortran 90 only

    I want to use one subrutine from Press Numerical Recipees: SUBROUTINE powell(p,xi,ftol,iter,fret) USE nrtype; USE nrutil, ONLY : assert_eq,nrerror So should I compile nrtype and nrutil as a module or there is an easier way ?
  8. milenko76

    is this intrinsic function?

    I agree with you it is pseudo norm.The physical problem is to calculate distance from cluster centers,dist_ik,which should be later weighted(other subroutine). D=(Yk-Vi)T(Yk-Vi) like this
  9. milenko76

    is this intrinsic function?

    I found your post very usefull.I have found function. function func(PP) ! Objective function Use OptV Implicit None Real :: Func, PP(c*s) ! v(:,:) reshaped Integer :: i, k real, pointer :: dist_ik(:) real(kind(1d0)) row_sum, total integer, save :: count=0 vv = Reshape(PP, (/ c, s...
  10. milenko76

    is this intrinsic function?

    I have subroutine like this: Subroutine FuncSub(N, PP, F) Implicit None integer :: N real :: PP(N), F, func F = func(PP) end Subroutine FuncSub I do not understand F = func(PP)?
  11. milenko76

    how to manipulate 2d array

    I have calculated some matrixes,I want to call from the main code and put that into one matrix.I have eight (7,7) arrays and I want to write them on diagonal of new array to create (56,56) array.Any ideas?
  12. milenko76

    subroutine problem

    I have iterative process but my subroutine has problems. c ====================================== subroutine datainpe c ====================================== use definitions use mt2ddat implicit none write(*,*)iper id1=iper/10 id2=iper-id1*10...
  13. milenko76

    reshape issue!

    I have a file with 1680 numerical values,I want to read it and reshape it,later use that array for further calculations.Like this: integer:: i,j real,dimension(1680) :: s real, dimension(21,80) :: ist integer,dimension(80,80) :: wd,wd2...
  14. milenko76

    char intrinsic

    Works fine now.
  15. milenko76

    char intrinsic

    I am trying this: id1=iter/10 id2=iter-id1*10 tfile(3:4)=char(id1+48)//char(id2+48) I have defined: data tfile/'nr .res'/ Still i get file like this: nr .res I would like to be nr01.res,... and so on. Where could be a problem?

Part and Inventory Search

Back
Top