Mathematics is the study of quantity, structure, space, and change. Any math questions on this site should be programming related.
0
votes
0answers
5 views
Checking independence of variables in a Bayesian network
I need a little help with Bayesian Networks.
Consider given the following netwrok (all variables are binary) and we need to check conditional independece of A and C if X and Z are given.
Any ...
2
votes
0answers
9 views
Dual Contouring - Normal Vectors of a Noise Function
I'm currently working on a voxel engine that utilizes dual contouring to give the terrain a more organic/real-life look.
If you're not familiar with dual contouring, basically I need to supply a ...
1
vote
3answers
46 views
Python-How to convert function argument into numeric operator/float()/int()?
What I tried to do:
Create a calculator application. Write code that will take two numbers
and an operator in the format: N1 OP N2, where N1 and N2 are floating point or
integer values, and OP ...
0
votes
1answer
33 views
Finding the change needed in location to move around the circumference of a circle#2
I asked about this yesterday as well and was told that I needed to be using radians. I had assumed that was the answer but there does appear to be another problem with the code below. I am trying to ...
0
votes
1answer
36 views
Getting the velocity vector from position vectors
I looked at a bunch of similar questions, and I cannot seem to find one that particularly answers my question. I am coding a simple 3d game, and I am trying to allow the player to pick up and move ...
-2
votes
1answer
24 views
Angle between points across junction MATLAB [duplicate]
I have three points (A , B and C) and junction J. I want to calculate Theta1 (angle between AJC) and Theta2 (angle between AJB (outer angle)) to decide if vessel belonging to c is same vessel as ...
0
votes
2answers
29 views
Error with If-Else statement combine with Math in .bat file
It's supose to be simples, but i can't get it working ! Maybe someone could help...
I just need a program that check if '07503.csv' file exists, and than '07504.csv', '07505.csv'...until '07552.csv'. ...
1
vote
2answers
47 views
Convert a list of floats to the nearest whole number if greater than x in Python
I'm new to Python and I did my research but didn't get far, hence the post for help.
I have a list of floats which I would like to round to the nearest whole number ONLY if the element is greater ...
1
vote
1answer
35 views
PHP Random Number Generation Issue
10,000 Loops
Range 0-1
Base Average: 0.5
Base Standard Deviation: 0.288675134595
=======================================
mt_rand()
Average: 0.337839939116
Standard Deviation: 0.264176807272
---
...
2
votes
4answers
74 views
How do I convert a serial number from horizontal to vertical without if else?
I am working on a web-page for my company about an on-line survey page, our customer service team will simply input some check-box questions into a database. and my job is to display them on a page ...
-3
votes
1answer
34 views
Php how to count this? [closed]
I have likes variable and dislikes variable, how should I change it to rating from 0 to 5 ?
Example:
0 Likes - 0 Dislikes = 0 Rating
1 Likes - 0 Dislikes = 5 Rating
5 Likes - 5 Dislikes = 2.5 ...
0
votes
1answer
25 views
Finding the change needed in location to move around the circumference of a circle
I am trying to write a method which will allow my Gladiators to rotate a central point between the two, to circle each other so to speak. Below is my code. Gladiator variable target is of Gladiator ...
1
vote
1answer
34 views
3D rotations to connect balls and cylinders
I've been tasked with writing a python based plugin for a graph drawing program that generates an STL model of a graph. A graph being an object made up of vertices and edges, where a vertex is ...
1
vote
2answers
68 views
Is this possible? Last few digits of sum equal to another number
I have a n-digit number and a list of numbers, from which any number can be used any number of times.
Taking numbers from the list, how do I know that it is possible to generate a sum such that the ...
2
votes
3answers
55 views
Whats wrong with my division?
I have a 16-bits sample between -32768 and 32767.
To save space I want to convert it to a 8-bits sample, so I divide the sample by 256, and add 128.
-32768 / 256 = -128 + 128 = 0
32767 / 256 = ...