dataandsignal / libmusic

Fast superresolution frequency detection using MUSIC algorithm
https://www.mathworks.com/matlabcentral/fileexchange/117630-libmusic_m
MIT License
28 stars 3 forks source link

libmusic + EmbeddedLapack + Cortex-M7 #2

Open vaalberith opened 3 years ago

vaalberith commented 3 years ago

Greetings! I'm trying to make the mentioned combo work together, EmbeddedLapack contains f2c-converted blas and lapack libs. Tests with dgesvd_ (6, 7) keep failing, test 2,3 with dgesvd are ok. VT and S matrixes differs from reference ones in 6,7. Correlation matrix is ok everywhere. So it seems that dgesvd breaks with bigger matrixes OR data is incorrectly handled between correlation and dgesvd. Could you, please, tell, why should we shuffle data in such way (is it transpose or smth else)? Sorry for stupid questions and thanks in advance! for (i = 0; i < M; ++i) { for (j = 0; j < N; ++j) { A[j * M + i] = Y[i * yn + j]; } }

piotrgregor commented 3 years ago

Thank you very much for your comments @vaalberith Both lmtest2.c and lmtest6.c use dgesvd to compute job parameters and job result. And yes: for (i = 0; i < M; ++i) { for (j = 0; j < N; ++j) { A[j * M + i] = Y[i * yn + j]; } } is to transpose Y[M, N] into A[N, M] cause this is what dgesvd is expecting.