ma=diag(3)+t(da)%*%da
R Code above, error message as follows:
Error in t(da) %*% da : requires numeric/complex matrix/vector argume
Matrix expression causes error “requires numeric/complex matrix/vector arguments”?
This error occurs because you are passing a String in vector and As string cannot be multiply. matrix(c('1','2','2','1'), nrow=2,ncol=2,byrow=TRUE)->> J
To correct it pass a numeric/complex arguments it works. matrix(c(1,2,2,1), nrow=2,ncol=2,byrow=TRUE)->> j
then use this t = j %*% t(j) //it will print the multiplication of matrix transpose and matrix. print(t)