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...
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...
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...
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 ?
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
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...
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)?
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?
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...
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...
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?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.