r8mat_write.m
来自「F90_MATLAB作为演示fortran90和matlab相互作用的例子:)」· M 代码 · 共 31 行
M
31 行
function r8mat_write ( file_name, m, n, a )%% R8MAT_WRITE writes an R8MAT to a file.%% Modified:%% 02 November 2007%% Author:%% John Burkardt%% Parameters:%% Input, string FILE_NAME is the name of the file to read.%% Input, integer M, N, the order of the matrix.%% Input, real A(M,N), the matrix.% file_unit = fopen ( file_name, 'w' ); for i = 1 : m for j = 1 : n fprintf ( file_unit, ' %f', a(i,j) ); end fprintf ( file_unit, '\n' ); end fclose ( file_unit );
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?