User`s manual
Examples of MAT-Files
6-23
if (status .ne. 0) then
write(6,*) 'Error closing MAT-file'
stop
end if
C
mp = matOpen('matdemo.mat', 'r')
if (status .ne. 0) then
write(6,*) 'Can''t open ''matdemo.mat'' for reading.'
stop
end if
C
pa1 = matGetMatrix(mp, 'Numeric')
if (mxIsNumeric(pa1) .eq. 0) then
write(6,*) 'Invalid non-numeric matrix written to MAT-file'
stop
end if
C
pa2 = matGetMatrix(mp, 'String')
if (mxIsString(pa2) .eq. 0) then
write(6,*) 'Invalid non-numeric matrix written to MAT-file'
stop
end if
C
pa3 = matGetMatrix(mp, 'String2')
if (pa3 .ne. 0) then
write(6,*) 'String2 not deleted from MAT-file'
stop
end if
C
status = matClose(mp)
if (status .ne. 0) then
write(6,*) 'Error closing MAT-file'
stop
end if
C
write(6,*) 'Done creating MAT-file'
stop
end