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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: milenko76
  • Order by date
  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?
  16. milenko76

    reading from array

    When I read from file model 1: do i=2,nc read(5,*)icd,res(icd),ivar(icd) cond(icd)=1./res(icd) In next iteration I read from array: xn=xnbig(:,:,iter) icdar1=xn(:,1) resar1=xn(:,2) ivarar1 =xn(:,3) How to denote that icdar1 has 57 elements icd,resar1...
  17. milenko76

    logical true. false. issue

    I have array and want to use intrinsic pack functions.The problem is that my array is quite a big one so creating mask can be done by repeating true and false.Is there any simple way how I can write witout repeating 80 falses while creating mask?
  18. milenko76

    writing to array again!

    You are right!I have followed your instructions,get file with many values -1.
  19. milenko76

    writing to array again!

    apr4sens is written into 128,I get 1680 numerical values all of them all rihgt. do i=1,nsites do ico=1,nc if(ivarp(ico).ne.0)then iprd=ivarp(ico) do k=1,4 write(128,*)apr4sens(k,i,iprd) enddo endif...
  20. milenko76

    writing to array again!

    group(1,:,:)=apr4sens(1,:,:) group(2,:,:)=apr4sens(2,:,:) group(3,:,:)=apr4sens(3,:,:) group(4,:,:)=apr4sens(4,:,:) write(129,*)group(1,:,:) So look at the 129: 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00...

Part and Inventory Search

Back
Top