l********n 发帖数: 5 | 1 I have two vector A, B of the same size n. They both store double inside.
I want to do the operation below, and store result into C, which is another
vector of same size n.
for i = 1 to n
if A(i) > B(i) C(i) = A(i)-B(i)
else C(i) = 0
I want to eliminate the for loop.
Currently I am searching inside the NAG lib, which may provide some matrix
operation doing the same job as above.
Does anyone know?
Thanks in advance. | l********n 发帖数: 5 | 2 NAG is Numeric Algorithmic Group. | l********n 发帖数: 5 | | J******d 发帖数: 506 | 4 周五晚上也。正房、小三和师妹都排在quant版前面吧?
【在 l********n 的大作中提到】 : 牛人周末都休息?
|
|