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
Your organization is planning to deploy wireless access points across their campus network, and you have been tasked with securi
AlladinOne [14]

Answer:

Controller APs is the correct answer to the following question.

Explanation:

Because controller APs is the type of APs you can secure your wireless access point of the campus and any other organization. This is one of the better ways to protect or secure your AP that can be controlled by the individual device which permit the centralized management.

So, that's why the following option is correct.

7 0
3 years ago
Hey, wanna pair our account on Brainly so we can share the perks? https://brainly.com/invite/8db681239ab5027e03b097bcded13755?ut
sashaice [31]

Answer:

Explanation:

NO Thx

8 0
3 years ago
Read 2 more answers
Software that interprets commands from the keyboard and mouse is also known as the ​
Luda [366]

Answer:

THE OPERATING SYSTEM (OS)

Explanation:

6 0
4 years ago
Công dụng của đồng hồ đo điện:vôn kế, ampe kế, oát kế
Lostsunrise [7]

Answer:

I wonder what are you saying?

Explanation:

Please give me brainliest :)

4 0
3 years ago
An open intersection is one that
alekssr [168]

 open intersection is one without traffic control signs or signals. When you enter one, you must yield the right-of-way if: A vehicle is already in the intersection. You enter or cross a state highway from a secondary road. hope this helped


4 0
3 years ago
Read 2 more answers
Other questions:
  • Ming is building an inexpensive computer to use for her online classes, and needs to purchase Windows. What is the most cost-eff
    8·1 answer
  • How can I sent a message?
    13·1 answer
  • In windows xp, which control panel icon should you choose if you would like to customize your system for left-handed use?
    7·2 answers
  • Which items may interfere with a wireless connection and may cause disruptions or delays in submitting assignments in blackboard
    9·2 answers
  • Which is the best description of the difference between bound and unbound forms? O Bound forms are similar to hierarchical forms
    7·1 answer
  • Read the excerpt from The Code Book. Other attacks include the use of viruses and Trojan horses. Eve might design a virus that i
    13·1 answer
  • Testing a function or program using test values that are at or near the values that change the outcome of the program is known a
    13·1 answer
  • Jack used primarily web sources for his informative speech about gun control. however, his over-reliance on the web site sponsor
    11·1 answer
  • Please help! I tried this by myself. But I am not sure if this is right.
    8·2 answers
  • 6. kinukuha nito ang kabuuang bilang ng mga numerical na datos sa mga piniling cells
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!