Hi, I code R to parse data but not for solving equations. So this is my first such problem. It is a programming puzzle. I have these two equations. 1) 4x - 3w = 0 2) 8x - 7w =0 I know the value of x and w for equation 1). x = 3 and w = 4 equation 2). x = 7 and w = 8 I also know how to write more equations based on data available in the puzzle. How do I solve a set of such equations ? I need to find out the values of x and w for each such equation. I know that here the equations are simple because the puzzle can be simplfied. Thanks, Mohan [[alternative HTML version deleted]]
In my education this was 9th or 10th grade (US) math. The r-help mailing list is not set up for providing mini-tutorials on R programming. Please read the Posting Guide, do the expected self-eduction in R programming, do the requested searching on your remaining questions in the Archives or StackOverflow and then in a few weeks considered reposting. Before doing so ... learn to post in plain text as as the Guide request. -- David. On Sep 7, 2014, at 1:54 AM, Mohan Radhakrishnan wrote:> Hi, > I code R to parse data but not for solving equations. So this is > my first such problem. It is a programming puzzle. > > I have these two equations. > > 1) 4x - 3w = 0 > 2) 8x - 7w =0 > > I know the value of x and w for > > equation 1). x = 3 and w = 4 > equation 2). x = 7 and w = 8 > > I also know how to write more equations based on data available in the > puzzle. > > How do I solve a set of such equations ? I need to find out the values of x > and w for each such equation. > > I know that here the equations are simple because the puzzle can be > simplfied. > > > Thanks, > Mohan > > [[alternative HTML version deleted]]-- David Winsemius Alameda, CA, USA
Hello, Inline. Em 07-09-2014 09:54, Mohan Radhakrishnan escreveu:> Hi, > I code R to parse data but not for solving equations. So this is > my first such problem. It is a programming puzzle. > > I have these two equations. > > 1) 4x - 3w = 0 > 2) 8x - 7w =0 > > I know the value of x and w for > > equation 1). x = 3 and w = 4 > equation 2). x = 7 and w = 8Why? Any of those equations defines a straight line, not a point. Those two points are just one of the infinitely many solutions. Your equations are equivalent to eq1) w = 4/3x eq2) w = 8/7x the equations of straight lines passing through the origin (no independent term).> > I also know how to write more equations based on data available in the > puzzle. > > How do I solve a set of such equations ? I need to find out the values of x > and w for each such equation.There are packages to solve simultaneous equations but I've never used them. Hope this helps, Rui Barradas> > I know that here the equations are simple because the puzzle can be > simplfied. > > > Thanks, > Mohan > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >