作者wtf0521 (Eason Lin)
看板Fortran
标题[问题] MAXLOC的用法?
时间Sun Apr 25 01:38:26 2010
不是很确定MAXLOC的用法,所以想请问一下大家
我需要知道A阵列当中最大值的位置,所以用b=MAXLOC(A)
可是一直出错 Error: The shapes of the array expressions do not conform.
b=MAXLOC(A)
^
想请问一下我用法有用错了吗?
这个直接write可以写出来,但是就不能存进b里面
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.115.55.152
1F:→ motoman:若你是一维的 这样写试试看 MAXLOC(A,1) 04/25 10:50
2F:→ wtf0521:mo大感谢您的回覆,等等你的和la大的方法我都会试试 04/25 11:27
3F:推 janhon:or 把B设成阵列 integer :b(1) 04/28 00:26