1/0.8x^2+0.5x+2

조회 수: 1 (최근 30일)
Fernando Cerna Sanchez
Fernando Cerna Sanchez 2022년 5월 29일
답변: Sam Chak 2022년 5월 29일
help

답변 (2개)

KSSV
KSSV 2022년 5월 29일
x = linspace(-1,1);
p = 1./(0.8*x.^2+0.5*x+2) ; % element by element operation
plot(x,p)
  댓글 수: 2
Walter Roberson
Walter Roberson 2022년 5월 29일
but possibly the 1/ only applies to the 0.8
KSSV
KSSV 2022년 5월 29일
I suspect it is OP's typo.

댓글을 달려면 로그인하십시오.


Sam Chak
Sam Chak 2022년 5월 29일
Based on the order of operations using PEMDAS: Parentheses, Exponents, Multiplication and Division (from left to right), Addition and Subtraction (from left to right) in mathematics and computer programming, I have at least helped you to type this out in MATLAB:
fcn = @(x) 1/0.8*x^2 + 0.5*x + 2
From here, you can do the options to do the following:
  • Plot the graph of this function
  • Solve the function
  • Find Taylor series expansion at point
  • Find the minimum of this function
  • Find the derivative of this function

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by