I appreciate all you help. This is only for instructional purpose:
A = matrix(c(0,1,1,-2,-3,1,2,-1,0,2,2,4,1,-3,-2,1,-4,-7,-1,-19), ncol=5,
byrow=T)
B =matrix(sample(c(0,1,1,-2,-3,1,2,-1,0,2,2,4,1,-3,-2,1,-4,-7,-1,-19),),
ncol=5, byrow=T)
Which print func( A, B, A+B) can print the resulting m
On Aug 28, 2010, at 11:32 AM, Cuckovic Paik wrote:
Thank you very much, David;
for row swapping: R2<==>R3
A=diag(1:4)
A
[,1] [,2] [,3] [,4]
[1,]1000
[2,]0200
[3,]0030
[4,]0004
A1=A[c(1,3,2,4),]
A1
[,1] [,2] [,3] [,4]
Thank you very much, David;
for row swapping: R2<==>R3
> A=diag(1:4)
> A
[,1] [,2] [,3] [,4]
[1,]1000
[2,]0200
[3,]0030
[4,]0004
> A1=A[c(1,3,2,4),]
> A1
[,1] [,2] [,3] [,4]
[1,]1000
[2,]0030
On Aug 28, 2010, at 10:12 AM, (Ted Harding) wrote:
On 28-Aug-10 13:15:47, Cuckovic Paik wrote:
Thank all help help. Ted's intuitive single step definition
is what I want.
I try to teach elementary Linear Algebra using R to manupilate
matrices.
Since my students have no programming experience a
On 28-Aug-10 13:15:47, Cuckovic Paik wrote:
> Thank all help help. Ted's intuitive single step definition
> is what I want.
> I try to teach elementary Linear Algebra using R to manupilate
> matrices.
> Since my students have no programming experience at all, any fancy and
> muliple step definitio
On 28-Aug-10 11:27:30, Gabor Grothendieck wrote:
> On Sat, Aug 28, 2010 at 1:32 AM, Cheng Peng
> wrote:
>>
>> Sorry for possible misunderstanding:
>>
>> I want to define a matrix (B) based on an existing matrix (A) in a
>> single
>> step and keep A unchanged:
>>
>>> #Existing matrix
>>> A=matrix(1
6 matches
Mail list logo