Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,42 @@
|
|||
function Transpose(double *A,*B, sys nx,ny)
|
||||
'==========================================
|
||||
sys x,y
|
||||
indexbase 0
|
||||
for x=0 to <nx
|
||||
for y=0 to <ny
|
||||
B[y*nx+x]=A[x*ny+y]
|
||||
next
|
||||
next
|
||||
end function
|
||||
|
||||
function MatrixShow(double*A, sys nx,ny) as string
|
||||
'=================================================
|
||||
sys x,y
|
||||
indexbase 0
|
||||
string pr="",tab=chr(9),cr=chr(13)+chr(10)
|
||||
for y=0 to <ny
|
||||
for x=0 to <nx
|
||||
pr+=tab A[x*ny+y]
|
||||
next
|
||||
pr+=cr
|
||||
next
|
||||
return pr
|
||||
end function
|
||||
|
||||
'====
|
||||
'DEMO
|
||||
'====
|
||||
|
||||
double A[5*4],B[4*5]
|
||||
'columns x
|
||||
'rows y
|
||||
|
||||
A <= 'y minor, x major
|
||||
11,12,13,14,15,
|
||||
21,22,23,24,25,
|
||||
31,32,33,34,35,
|
||||
41,42,43,44,45
|
||||
|
||||
print MatrixShow A,5,4
|
||||
Transpose A,B,5,4
|
||||
print MatrixShow B,4,5
|
||||
Loading…
Add table
Add a link
Reference in a new issue