Multiply matrix columns by values

astrotool
Posts: 25
Joined: 2008-05-12
Location: United States

I have a matrix where the units are dN/dlog(dp), and the columns represent sizes, and the rows represent times
I want to get just dN, so I made a copy of the matrix and called it dN, then made a wave that has the dlog(dp) values in it
I want to multiply each column of the matrix by their corresponding dlog(dp) values

so far I have been trying this:

dN[p][0]=dN[p][0]*dlogdp[0]
.
.
.
dN[p][49]=dN[p][49]*dlogdp[49]

but this method does not work, and usually only changes the first value in the matrix column
Is there any way to get this to work?

AttachmentSize
20080626-SMPScorrections.pxp1.44 MB

Posts: 92
Joined: 2007-06-29
Location: United States

Is this what you want?

dN *= dlogdp[q]


astrotool
Posts: 25
Joined: 2008-05-12
Location: United States

yes, exactly that! Thank you.


Back to top