Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error "Incompatible result matrix." #2

Open
simpler23 opened this issue Oct 13, 2019 · 0 comments
Open

Error "Incompatible result matrix." #2

simpler23 opened this issue Oct 13, 2019 · 0 comments

Comments

@simpler23
Copy link

simpler23 commented Oct 13, 2019

Hi, I've got an error "Incompatible result matrix." from the below method.
I'm using KalmanRx 2.0.0 version and kotlin.

public Matrix gemm(Matrix B, Matrix C, double alpha, double beta) {

    // m = rows;
    // n = columns;
    int p = B.n; // columns of B

    // cannot change C :(
    Matrix X = new Matrix(m, p); // X ~ C

    if (C == null) { // multiplication - rare, but necessary :(

        if (B.m != n) {
            throw new IllegalArgumentException("Matrix inner dimensions must agree.");
        }
       ....
      if (C.m != m || C.n != p) {
            **throw new IllegalArgumentException("Incompatible result matrix.");**
        }

My code is

val positionList: List = ...

KalmanRx.createFrom2D(rx.Observable.from(positionList.map { floatArrayOf(it.latitude.toFloat(), it.longitude.toFloat()) }))
.toList().subscribe { Log.i("tag", "arrived list: ${it}") }

I want to smooth the above list(val positionList).
What am I wrong?

This is a sample list value

(37.499884, 127.0351041) (37.4998852, 127.0351025) (37.4998853, 127.0351035) (37.4998876, 127.0351058) (37.4998904, 127.035109) (37.4998883, 127.035104) (37.4998849, 127.0351032) (37.4998897, 127.0351096) (37.4998857, 127.0351054) (37.4998844, 127.0351039) (37.4998843, 127.0351034) (37.4998899, 127.0351096) (37.4998858, 127.0351052) (37.4998845, 127.035104) (37.4998898, 127.0351097) (37.4998856, 127.0351049) (37.4998843, 127.0351036) (37.4998898, 127.0351096) (37.4998856, 127.035105) (37.4998841, 127.0351032) (37.4998842, 127.0351037) (37.4998899, 127.0351098) (37.4998858, 127.0351052) (37.4998844, 127.0351037) (37.4998843, 127.0351036) (37.4998845, 127.0351037) (37.4998846, 127.0351039) (37.4998901, 127.0351099)

Thank you and sorry for my poor English

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant