Why Cp Doesn't Calculate This:
#1
Posted 15 January 2009 - 06:30 PM
[...] => u
Sum{u[1,i],i,1,5}
Note that u is a 5*5 matrix and sum means sigma.
I need this or my exam on saturday.
I use this command in main and eActivity.
#2
Posted 15 January 2009 - 11:55 PM
This command Sum( ) is for list and not for matrixWhy Cp doesn't calculate this (line 2):
[...] => u
Sum{u[1,i],i,1,5}
Note that u is a 5*5 matrix and sum means sigma.
I need this or my exam on saturday.
I use this command in main and eActivity.
Edited by Gualberto Soto Sivila, 15 January 2009 - 11:57 PM.
#3
Posted 16 January 2009 - 04:52 AM
Sigma {u[1,i],i,1,5}.
#4
Posted 16 January 2009 - 07:54 AM
Anyway...
sum(matToList(trn(u),1))
Change 1 to whatever line you want to calculate. Remove "trn" if you want to get the sum of columns instead of lines.
Also, it's sum here, not sigma.
Edited by Kilburn, 16 January 2009 - 07:55 AM.
#5
Posted 17 January 2009 - 06:31 PM
Why don't you just use your brain and calculate it without using direct functions?
Anyway...sum(matToList(trn(u),1))
Change 1 to whatever line you want to calculate. Remove "trn" if you want to get the sum of columns instead of lines.
Also, it's sum here, not sigma.
Thanks for your comment.
I always use my brain.
using classpad and my brain, I did my exam in 1/3 of provided time.
I wrote more than 30 eactivity for my Advance Numerical analysis.
Btw, the problem was bigger than what I said. It was something like this:
Sigme(Sigma(u(i,j),i,1,10),j,1,10)
You know, I hate labour!
#6
Posted 19 January 2009 - 02:34 AM
define library\mSum(m)=sum(matToList(mÃfill(1,listToMat(matToList(trn(m),1))),1))or
define library\mSum(m)=trn(mÃfill(1,listToMat(matToList(trn(m),1))))Ãfill(1,listToMat(matToList(trn(trn(m)),1)))
Edited by vanhoa, 19 January 2009 - 02:50 AM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users