作者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