solving quadratic roots in matlab

์กฐํšŒ ์ˆ˜: 3 (์ตœ๊ทผ 30์ผ)
yumna
yumna 2024๋…„ 3์›” 8์ผ
๋Œ“๊ธ€: James Tursa 2024๋…„ 3์›” 9์ผ
the question asks: How would i write a (Script) to calculate the two roots of any quadratic equation of the form ๐‘Ž๐‘ฅ2 + ๐‘๐‘ฅ + ๐‘ = 0 using the function input to enter the values of ๐‘Ž, ๐‘ and ๐‘ from the keyboard. As well as using strings and the function disp to display the result in matlab?
Check the correct operation of the program yourself by running it on thefollowing examples:
5๐‘ฅ2 + 11๐‘ฅ + 5 = 0
5๐‘ฅ2 + 10๐‘ฅ + 5 = 0
5๐‘ฅ2 + 9๐‘ฅ + 5 = 0
and comparing their outputs with the solutions obtained by hand calculation. Do not use the function roots.
  ๋Œ“๊ธ€ ์ˆ˜: 1
James Tursa
James Tursa 2024๋…„ 3์›” 9์ผ
What have you done so far?

๋Œ“๊ธ€์„ ๋‹ฌ๋ ค๋ฉด ๋กœ๊ทธ์ธํ•˜์‹ญ์‹œ์˜ค.

๋‹ต๋ณ€ (1๊ฐœ)

Matt J
Matt J 2024๋…„ 3์›” 8์ผ
Hint: You should consider applying the quadratic formula.

์นดํ…Œ๊ณ ๋ฆฌ

Help Center ๋ฐ File Exchange์—์„œ Image Category Classification์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด๊ธฐ

ํƒœ๊ทธ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by