I want to convert my matlab code to java
In matlab I called sin(1621*2*pi*0.0001) and it returns 0.7979
now in JAVA I called Math.sin(1621*2*Math.PI*0.0001) and it returns 0.8513
Why???
The problem was I use 0.0001 as java rounded but matlab does not round it
The answer is 0.8513.
When I type it in Matlab I get 0.8513 as answer.
Maybe you should check in your code if you assign not a value to "pi" that is not equal to 3.1415...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With