필터 지우기
필터 지우기

solving a x^4 function using roots, how?

조회 수: 1 (최근 30일)
Rand Renwar
Rand Renwar 2016년 9월 30일
답변: dbmn 2016년 9월 30일
I've read about roots but I didn't quite understand it. If I have a function, how do I find the roots? By using the function roots. y = x^(4) - 2*x^(3) - 4*x^(2) - 2*x - 12
I've tried roots(y) but got the answer: >> roots(y)
ans =
Empty sym: 0-by-1
I'm not sure what it means..

답변 (1개)

dbmn
dbmn 2016년 9월 30일
Hi Rand,
it uses a certain way of notation. f.ex. for f(x) = 3x^2 -2x -4, you would use
p = [3 -2 -4];
r = roots(p)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by