1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Veronika [31]
3 years ago
15

Write a MATLAB program to solve for the roots of a quadratic equations, regardless of type. Use complex variables so that no bra

nches will be required based on the value of the discriminant. g
Computers and Technology
1 answer:
slavikrds [6]3 years ago
5 0

Explanation:

PROGRAM  QuadraticEquation

  IMPLICIT  NONE

  REAL  :: a, b, c

  REAL  :: d

  REAL  :: root1, root2

   

!  read in the coefficients a, b and c

  READ(*,*)  a, b, c

  WRITE(*,*) 'a = ', a

  WRITE(*,*) 'b = ', b

  WRITE(*,*) 'c = ', c

  WRITE(*,*)

!  compute the square root of discriminant d

  d = b*b - 4.0*a*c

  IF (d >= 0.0) THEN            

     d     = SQRT(d)

     root1 = (-b + d)/(2.0*a)  

     root2 = (-b - d)/(2.0*a)

     WRITE(*,*)  'Roots are ', root1, ' and ', root2

  ELSE                          

     WRITE(*,*)  'no real roots exist!'

     WRITE(*,*)  'Discriminant = ', d

  END IF

END PROGRAM  QuadraticEquation

You might be interested in
642<br> +277<br> What does 642+277
svet-max [94.6K]
Answer:
642+277= 919
6 0
3 years ago
Technology never has negative consequences for society. true or false.
never [62]
False, as an example, new technology that is not yet perfected can cause huge problems and even old technology can still cause problems. Technology doesn't always solve things a lot of the time it just changes the problem
3 0
3 years ago
What is the difference between a learner’s license and an operator’s license?
Allushta [10]
A learner's license does not allow the person to drive without someone else who has their operator's (or driver's license) or an adult who is at least 21. Although this varies depending on the state. 
7 0
3 years ago
Why is this app here to help but wont let me see answers to my questions?
UkoKoshka [18]

Answer:

maybe you need to reload the page and press the little bell on the right side and u should get a notification when somebody answers your question and if that doesnt help go to your profile and press the tab (on this tab if that makes since) it should say sumin like questions you asked and u should press the ones u need the answers to

Explanation:

lmk if this helped

5 0
3 years ago
Read 2 more answers
You are a solutions engineer working for a large communications company that is migrating its existing server estate to AWS. You
erik [133]

Answer:

4 subnets

Explanation:

According to the specifications provided, it seems that you would need a total of 4 subnets for the entire server structure. This is because each web server needs 1 public subnet and each database needs one private subnet. If there are a total of 2 web servers and 2 database servers then each one will ultimately have 2 subnets meaning a total of 4 subnets. These would be 2 public subnets and 2 private subnets for the different availability zones, which would allow the server structure to maintain high availability.

4 0
3 years ago
Other questions:
  • A/An is a series of instructions or commands that a computer follows; used to create software
    10·2 answers
  • Atari licensed a game from taito that became a smash-hit and helped sell the vcs/2600. what is the name of that game?
    14·2 answers
  • You can join tables by using a condition in the ____ clause.​
    7·1 answer
  • Write a multi-paragraph Informational essay about a current event in the news. You can develop your topic using
    8·2 answers
  • The documents created in ms-excel is call what?​
    11·2 answers
  • PLEASE AWNSER 50 POINTS PLUS BRAINLEST ILL FAIL MY GRADE IF I DONT AWNSER IN A HOUR!
    15·1 answer
  • HELP! WILL GIVE BRAINLYEST!
    13·1 answer
  • Why is computer called information processing maching???​
    6·2 answers
  • In my mouth In my hair..........​
    15·2 answers
  • Apart from mATX and ATX what are the other form factors of power supply
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!