103 |
|
for (j = refm.ncomp; j-- > 0; ) |
104 |
|
rop->preop.cmat[j*nc + i] = scresp[j]; |
105 |
|
} |
106 |
+ |
memcpy(rop->mtx->wlpart, refm.wlpart, sizeof(rop->mtx->wlpart)); |
107 |
|
return(0); |
108 |
|
} |
109 |
|
|
275 |
|
if (rop->preop.nsf == 1) { |
276 |
|
for (i = rop->preop.clen; i--; ) |
277 |
|
rop->preop.cmat[i] *= rop->preop.sca[0]; |
278 |
< |
} else if (rop->preop.nsf != rop->mtx->ncomp) { |
278 |
> |
} else if (rop->preop.nsf*rop->mtx->ncomp != rop->preop.clen) { |
279 |
|
fprintf(stderr, "%s: -s must have one or %d factors\n", |
280 |
< |
rop->inspec, rop->mtx->ncomp); |
280 |
> |
rop->inspec, |
281 |
> |
rop->preop.clen/rop->mtx->ncomp); |
282 |
|
goto failure; |
283 |
|
} else { |
284 |
< |
for (j = rop->preop.clen/rop->preop.nsf; j--; ) |
285 |
< |
for (i = rop->preop.nsf; i--; ) |
286 |
< |
rop->preop.cmat[j*rop->preop.nsf+i] *= |
287 |
< |
rop->preop.sca[i]; |
284 |
> |
for (i = rop->preop.nsf; i--; ) |
285 |
> |
for (j = rop->mtx->ncomp; j--; ) |
286 |
> |
rop->preop.cmat[i*rop->mtx->ncomp+j] |
287 |
> |
*= rop->preop.sca[i]; |
288 |
|
} |
289 |
|
} |
290 |
|
mres = rmx_transform(rop->mtx, rop->preop.clen/rop->mtx->ncomp, |