Changeset 1321 for applications/pmsm/simulator_zdenek/test_Ch.cpp
- Timestamp:
- 04/04/11 14:15:18 (13 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/pmsm/simulator_zdenek/test_Ch.cpp
r1241 r1321 27 27 int PSICh[25]={0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0}; 28 28 int Chf[25]={0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0}; 29 int Cf[10]={0,0,0,0,0, 0,0,0,0,0}; 29 30 int multip=1<<15; 30 31 … … 129 130 vec b; 130 131 mat C = zeros(2,5); 131 C(0,0)=1.0;C(1,1)=1.0; 132 C(0,0)=.2;C(1,1)=0.4;C(0,1)=0.3; 133 132 134 for (int iy=0; iy<2; iy++){ 133 135 a = U.T()*C.get_row(iy); // a is not modified, but … … 160 162 161 163 Ch = U*diag(sqrt(D)); 164 mat_to_int16(round_i(C*multip),Cf); 162 165 163 166 cout << "bef Carlson: " << imat(Chf,5,5) << endl; 164 165 carlson (difz,xf, Chf,Rf, 2, 5);167 168 carlson_fastC(difz,xf, Chf, Cf,Rf, 2, 5); 166 169 167 170 cout << endl<<"after Carlson" <<endl;