阅读背景:

Fortran相当于matlab find - 应用于切片矩阵而没有内存重复

来源:互联网 

I use the command find quite a lot in matlab, and I wonder how to translate this smartly in fortran to extract a slice of an array. In matlab you can slice with either logicals or indexes, but in fortran you need indexes to slice. I'm aware of the intrinsic subroutines pack et al, but have never used them. Also, since I'm dealing with big matrices, I would like to avoid duplicating memory. I want the sliced matrix to be manipulated within a subroutine. I've read somewhere that slices of array were not duplicated. I don't know how this the slicing in done in matlab though. I'm puzzled also because in matlab some allocations are transparent to you. I use the command find quite a lot in matlab, a




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: