Prev: bitshift
Next: request for coding
From: nethaji anandhavalli on 10 Apr 2010 04:49 hi, for the derivation enenrgy= summation of ( modulus of d(i)(j))^2 ) i= 1........L and j=1.......N which one would be correct in matlab? set 1: energy1=0 for i=i:N-1 for j=1:L-1 temp1=d(i) temp2=d(j) temp3=temp1 * temp2; energy1=energy1+ (temp3*temp3) end end note: this program would provide the energy for each coefficients values, am i right? set 2: double d[L][N] double enenrgy=0 for i=i:N-1 for j=1:L-1 enenrgy+=d[i][j]^2 end end set 3: double energy=0 for i=i:N-1 for j=1:L-1 enenrgy=(i%j)*(i%j); energy+=energy; end end pls sir. tell me which one would provide the better result? which get suit for above derivation in matlab. -- with regards, Nethaji anandhavalli . D
|
Pages: 1 Prev: bitshift Next: request for coding |