Hello, I'm relatively new to R.  I've read the intro guide, but I
can't quite figure out how to:

I have a function:

Jcost <- function (theta, in, out) {
  a <- output - input %*% theta
  1/2 * t(a) %*% a
}

where 
"theta" is a 2x1 matrix
"in" is a 20x2 matrix
"out" is a 20x1 matrix
return value is a scaler

This works well when I only want to compute given 1 theta matrix.  How
do I compute several (say N) 2x1 theta matrices and get back N scaler
values?

Thanks!

-- 
-david
David Chu

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to