Hi mikrom,
Oh, I see. [dazed] You can plot the result of 2D-case. When the data points are sampled from parabolic surface, the approximated surface should fit the original one very well (I suppose so). Since the basis function is multinomial, the information contained in this approximation...
Hi, mikrom,
What do you mean about the difference between 1D-case and 2D-case? The program is running normally, the only problem is the record length setting at the open file statement. You can adjust it according to your computing environment.
Thanks for replying!
DONG Li
Hi, guys,
I have implemented the least squares using orthogonal multinomials basis. The result is ok in 1D problems, but not good in 2D.
The structure of the codes is:
a module file - orthogonal_multinomials_least_squares.f90
a test main file - test_OMLS_1d.f90 & test_OMLS_2d.f90
program...
Hi,
I made a small test program for allocatable array, as following
[code]
real, allocatable :: a(:)
allocate(a(2))
a(1) = 1.0
a(2) = 2.0
a(3) = 3.0 ! This can be accessed!!!
write(*, *) a(1), a(2)
write(*, *) a(3)
[\code]
The result is:
[code]
1.00000000000000...
Hi guys,
It is so alive, here! I have faced this problem, too, several weeks ago. My one dimensional data is irregularly distributed, so I used cubic smooth spline (in Matlab) to make an approximation of the continuous distribution, then made samples (dense enough) for derivative calculation...
Thanks xwb, it works!
real a
integer(1) b(4)
b = transfer(a, b)
BUT, b(1) is the lowest byte of a, and b(4) is the highest one. The order is a little strange.
Hi,
I want to extract one specific byte from a 4-bytes real variable. How to do it?
For example:
real :: a = 42
integer(1) :: b
a: 01000010001010000000000[00000000] -> b
Thanks for help!
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.