Dear Berend,
Â
No need to devide what all you need a indentity matrix with same
dimesion.
 Following is one way to achieve this.
Â
 mat Hi,
>
> I have a matrix as below:
>
> mat=
>Â Â Â Â [,1]Â Â [,2]Â Â [,3]
> [1,]Â Â Â Â 1Â Â Â Â 4Â Â Â Â 7
> [2,]Â Â Â Â 2Â Â Â Â 5Â Â Â Â 8
> [3,]
It's not quite clear what you want to do. Is it just this?
a<-c(1,2,3,4)
dim(a)<-c(2,2)
a/a
This gives the element by element ratio.
HTH,
Daniel
shukor wrote
>
> Hi,
>
> I have a matrix as below:
>
> mat=
> [,1] [,2] [,3]
> [1,]147
> [2,]258
> [3,]36
On 17-09-2012, at 07:31, Jha, Ashutosh Kumar wrote:
> Dear Berend,
>
> No need to devide what all you need a indentity matrix with same dimesion.
> Following is one way to achieve this.
>
> mat<-matrix(1,ncol=ncol(mat),nrow=nrow(mat)).
That is not an identity matrix. It is a matrix with
On 17-09-2012, at 06:50, s.s.m. fauzi wrote:
> Hi,
>
> I have a matrix as below:
>
> mat=
> [,1] [,2] [,3]
> [1,]147
> [2,]258
> [3,]369
>
> What I want to do is, I would like to divide each column with its own
> value, in order to get value 1.
> Is th
Hi,
I have a matrix as below:
mat=
[,1] [,2] [,3]
[1,]147
[2,]258
[3,]369
What I want to do is, I would like to divide each column with its own
value, in order to get value 1.
Is there any simple script for that?
[[alternative HTML version dele
5 matches
Mail list logo