Hi Rolande,
The * operator does exactly what you want. E.g.
ncl 0> a=(/(/1,2/),(/3,4/)/)
ncl 1> write_matrix(a*a,"2i5",False)
1 4
9 16
ncl 2>
If you want a matrix multiplication you would need the # operator. E.g.
ncl 2> write_matrix(a#a,"2i5",False)
7 10
15 22
ncl 3>
Hope this helps,
Oli
> -----Original Message-----
> From: ncl-talk-bounces@ucar.edu
> [mailto:ncl-talk-bounces@ucar.edu] On Behalf Of Rolande Tchouaken
> Sent: Montag, 16. November 2009 10:14
> To: ncl-talk@ucar.edu
> Subject: Is existing a function in ncl who do
> product pf twomatrix (Aij*Bij)?
>
> Good morning dir,
>
> I want to know if exist in ncl a function who do product of
> same elment of two matrix in ncl.
> And if is yes, what is the name of this function.
>
> Example: product of Aij*Bij, where A and B is matrix who have
> same dimension, ij are indice of elment of the matrix.
>
> Thank for your comprehension.
>
>
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Nov 16 03:03:12 2009
This archive was generated by hypermail 2.1.8 : Tue Nov 17 2009 - 17:27:42 MST