Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'assigning arbitrary matrix to a function' topicStudent Support Forum > General > "assigning arbitrary matrix to a function"

Next Comment >Help | Reply To Topic
Author Comment/Response
kyra
09/05/12 04:04am

Hi!

how do i assign an aritrary list to a function? like

A={{1,1},{1,2},{1,3}}
where F[A] returns:
F[A]=A[[1,1]]+A[[1,2]]

i tried the following, but it is not working:
F[Mat_]:=Mat[[1,1]]+Mat[[1,2]]

i am using mahtematica 8

Thank you for your help!
Kyra

URL: ,

Subject (listing for 'assigning arbitrary matrix to a function')
Author Date Posted
assigning arbitrary matrix to a function kyra 09/05/12 04:04am
Re: assigning arbitrary matrix to a function Bill Simpson 09/05/12 11:53am
Next Comment >Help | Reply To Topic