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
What piece of software tells the operating system how to use a specific hardware device?
professor190 [17]
A driver for that hardware specific task. Like Nvidia makes GPU's so they also make GPU drivers
8 0
4 years ago
Under which condition below would you expect a glassy extrusive rock like obsidian to form?
agasfer [191]
Hihi!

The correct answer would be D. Quick cooling on Earth's surface! Obsidian is<span>a volcanic rock formed by the rapid solidification of lava without crystallization!

I hope I helped!
-Loliarual
</span>
7 0
4 years ago
Read 2 more answers
What command should you use to rearrange parts of files on the drive so they are contiguous?
Sunny_sXe [5.5K]
<span>What command should you use to rearrange parts of files on the drive so they are contiguous? Answer = Defrag</span>
3 0
4 years ago
When does personal information often need to be entered online?
soldi70 [24.7K]

Answer:

Like when your doing an application for a job or anything important lol

Explanation:

3 0
3 years ago
A variable that can have values only in the range 0 to 65535 is a :
Thepotemich [5.8K]

Answer:

a.

Explanation:

Two bytes have 2 times 8 bits is 16 bits.

Max value that can be expressed is 2¹⁶-1 = 65535

6 0
3 years ago
Other questions:
  • Write a static method named anglePairs that accepts three angles (integers), measured in degrees, as parameters and returns whet
    10·1 answer
  • “You have been blocked”
    5·2 answers
  • Write motivation of cache memory​
    9·1 answer
  • From Blown to Bits why is it important to know what children are doing on the Web Tonight?
    7·1 answer
  • (a) Define a goal for software product quality and an associated metric for that attribute. (b) Explain how you could show that
    7·1 answer
  • List out various computer generation long with their basic characteristic ​
    13·1 answer
  • Which new development in malware caused sandbox technology to automate and introduce artificial intelligence learning
    14·1 answer
  • 12. Why is it so important to pay attention to your digital reputation?
    14·1 answer
  • What is e banking effects
    7·1 answer
  • A _____ consists of horizontal bars, connected with arrows that indicate task dependencies.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!