0
$\begingroup$

I am having an issue solving this. I wrote this equation to find the with of a bar for a bar chart that is comparative. \begin{equation} D-P*(N+1) = ((N-1)*M)*B*0.75+N*B \end{equation}

  • 0
    @RossMillikan Yeah, my bad sorry for confusion.2012-07-03

1 Answers 1

1

No guarantee that the result will be an integer, but just distribute the $B$ out of the terms on the right and divide.

$\begin{equation} D-P*(N+1) = ((N-1)*M)*B*0.75+N*B \end{equation}$

$\begin{equation} D-P*(N+1) =( ((N-1)*M)*0.75+N)*B \end{equation}$

$\begin{equation} (D-P*(N+1))/( ((N-1)*M)*0.75+N)=B \end{equation}$

  • 0
    My first math question on math.stackexchange... I am a programmer so I always use stackOverflow. In programming * is a common for multiplication. Here is the equation in objective-c: float barWidth = (drawableArea-SECTION_SPACING*([barArray count]+1)) / ((([barArray count]-1)*[barSetArray count])*0.75+[barArray count]);2012-07-03