Comments (1)
done, thanks
from fortran2018-examples.
Related Issues (5)
- libISO HOT 21
- MAINT: keeping test counts same cmake/meson/ compilers / os
- cmake errors
- fortran program svd_example ! Declare variables integer, parameter :: m = 4, n = 3, lda = 4, ldu = 4, ldvt = 3 integer :: i, j, info real(kind=8) :: a(lda,n), s(n), u(ldu,m), vt(ldvt,n), superb(min(m,n)-1) ! Initialize matrix A with some random values do j=1,n do i=1,m a(i,j) = dble((i-1) + (j-1)*m) end do end do ! Compute the SVD of matrix A using LAPACK routine DGESVD call dgesvd('A', 'A', m, n, a, lda, s, u, ldu, vt, ldvt, superb, info) ! Print the results: matrices U and Vt and vector S. write(*,'(a)') 'Matrix U:' do i=1,m write(*,'(4f8.2)') (u(i,j),j=1,min(m,n)) end do write(*,*) write(*,'(a)') 'Vector S:' write(*,'(3f8.2)') (s(j),j=1,min(m,n)) write(*,*) write(*,'(a)') 'Matrix Vt:' do i=1,min(m,n) write(*,'(3f8.2,a,f8.2)') (vt(i,j),' ',char(10),superb(i)) end do end program svd_example
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fortran2018-examples.