正在加载图片...
1.1. The Golden Ratio The roots of this equation are given by the quadratic formula: 1士 The positive root is the golden ratio. If you have forgotten the quadratic formula, you can ask MaTLab to find the roots of the polynomial. MATLAB represents a polynomial by the vector of its coefficients, in descending order. So the vector p(a) The roots are computed by the roots function. r roots(p) 803398874989 1.61803398874989 ers are the only numbers whose reciprocal can be computed by subtracting You can use the Symbolic Toolbox, which connects MATLAB to Maple, to solve the aspect ratio equation without converting it to a polynomial. The equation is represented by a character string. The solve function finds two solutions r= solve(1/x=x-12) produce 1/2*5^(1/2)+1/2] [1/2-1/2*5(1/2)] e pretty function displays the results in a way that resembles typeset mathe- matics pretty (r) 1/2 [1/25+1/2] 1/2] [1/2-1/1.1. The Golden Ratio 3 The roots of this equation are given by the quadratic formula: φ = 1 ± √ 5 2 . The positive root is the golden ratio. If you have forgotten the quadratic formula, you can ask Matlab to find the roots of the polynomial. Matlab represents a polynomial by the vector of its coefficients, in descending order. So the vector p = [1 -1 -1] represents the polynomial p(x) = x 2 − x − 1. The roots are computed by the roots function. r = roots(p) produces r = -0.61803398874989 1.61803398874989 These two numbers are the only numbers whose reciprocal can be computed by subtracting one. You can use the Symbolic Toolbox, which connects Matlab to Maple, to solve the aspect ratio equation without converting it to a polynomial. The equation is represented by a character string. The solve function finds two solutions. r = solve(’1/x = x-1’) produces r = [ 1/2*5^(1/2)+1/2] [ 1/2-1/2*5^(1/2)] The pretty function displays the results in a way that resembles typeset mathe￾matics. pretty(r) produces [ 1/2 ] [1/2 5 + 1/2] [ ] [ 1/2] [1/2 - 1/2 5 ]
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有