Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 937921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:33:22+00:00 2026-05-15T21:33:22+00:00

Possible Duplicate: System of linear equations in C++? I have the following 2 systems

  • 0

Possible Duplicate:
System of linear equations in C++?

I have the following 2 systems of equations:

For a,b,c,d:

0 = a * r1_x + b * r1_x * r1_y + c * r1_y + d
1 = a * r2_x + b * r2_x * r2_y + c * r2_y + d
0 = a * r3_x + b * r3_x * r3_y + c * r3_y + d
1 = a * r4_x + b * r4_x * r4_y + c * r4_y + d

For e,f,g,h:

0 = e * r1_x + f * r1_x * r1_y + g * r1_y + h
0 = e * r2_x + f * r2_x * r2_y + g * r2_y + h
1 = e * r3_x + f * r3_x * r3_y + g * r3_y + h
1 = e * r4_x + f * r4_x * r4_y + g * r4_y + h

I know the values of r1_x, r1_y, r2_x, r2_y, r3_x, r3_y, r4_x, r4_y,
and need to solve for a,b,c,d in the first one, and ,e,f,g, h in the second.

I know how I would solve these with pencil and paper, but I’m really unsure how to program it. How could I solve the above equations in C or C++ (or psuedocode).

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T21:33:23+00:00Added an answer on May 15, 2026 at 9:33 pm

    You can map it to a matrix system, A x = b, where A is the coefficient matrix, b is the solution vector, and x are the unknowns. You can either implement Gaussian elimination, or use a well known library. If you use LAPACK, the routine you want it dgesv.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: class System.Random .. why not static? Following on from Generated random numbers
Possible Duplicate: What is System.Void? I have no practical reason for knowing this answer,
Possible Duplicate: Solving a linear equation I need to programmatically solve a system of
Possible Duplicate: How to check if an object is nullable? I have a System.Type
Possible Duplicate: What is a version control system? How is Git useful? We have
Possible Duplicate: mscorlib.dll & System.dll What does mscorlib.dll do in CLR when we have
Possible Duplicate: Stack Overflow / reddit voting system in php How do voting systems,
Possible Duplicate: How can I run Perl system commands in the background? I have
Possible Duplicate: Sizeof array passed as parameter Given the following code, the system I'm
Possible Duplicate: Hide console in C system() function, Win. Hi guys I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.