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

mode always gets the first number #10

Open
ghost opened this issue May 13, 2016 · 1 comment
Open

mode always gets the first number #10

ghost opened this issue May 13, 2016 · 1 comment
Assignees
Labels

Comments

@ghost
Copy link

ghost commented May 13, 2016

I am getting wrong values for mode.

For example, for {4, 3, 3}, I am getting 4 for mode. It is as if, I am getting the first number for mode.

Here are a few examples with arrays of 3 and 4:

4.00 3.00 3.00
Mean: 3.33
Mode: 4.00

4.00 0.00 0.00
Mean: 1.33
Mode: 4.00
Smooth: 2.67

0.00 2.00 2.00
Mean: 1.33
Mode: 0.00
Smooth: 0.67

3.00 3.00 4.00
Mean: 3.33
Mode: 3.00
Smooth: 3.33

4.00 0.00 0.00 2.00
Mean: 1.50
Mode: 4.00

2.00 4.00 3.00 3.00
Mean: 3.00
Mode: 2.00

4.00 3.00 3.00 0.00
Mean: 2.50
Mode: 4.00

Please see below the code:

SmoothObject.ino.zip

Do you know if this is a bug or a result of my code? If it is a result of my code, I would appreciate hearing how to fix it.

@majenkotech majenkotech self-assigned this May 15, 2016
@majenkotech
Copy link
Contributor

Should be fixed in bbc2502

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

No branches or pull requests

1 participant