Stationary point, local minimum, local maximum and inflection point
이전 댓글 표시
I am given some function of x1 and x2. Example f(x1,x2)=3x1^2+2x1x2+2x2^2+7. How can I find the stationary point, local minimum, local maximum and inflection point from that function using matlab? Please tell me the feature that can be used and the coding, because I am really new in this field. Thank you in advance.
댓글 수: 3
reman
2023년 3월 3일
syms x y
% Define the function f(x,y)
f = 8*x^2 + 6*y^2 - 2*y^3 + 5;
% Compute the partial derivatives of f(x,y) with respect to x and y
df_dx = diff(f, x);
df_dy = diff(f, y);
% Solve the system of equations df_dx = 0 and df_dy = 0 to find the stationary points
[stationary_points_x, stationary_points_y] = solve(df_dx == 0, df_dy == 0);
% Evaluate the function f(x,y) at the stationary points
stationary_point_values = subs(f, [x y], [stationary_points_x stationary_points_y])
% Display the results
disp("Stationary Points:")
disp([stationary_points_x stationary_points_y])
disp("Function Values at Stationary Points:")
disp(stationary_point_values)
Undefined function 'syms' for input arguments of type 'char'.
Stationary Points:
[ 0, 0]
Function Values at Stationary Points:
[ 5]
Unrecognized function or variable 'Stationary'.
reman
2023년 3월 3일
Find the stationary points of the function f(x, y) = 8x 2 + 6y 2 −2y 3 + 5 and its function values. with matlab code
reman
2023년 3월 3일
Find the stationary points of the function f(x, y) = 8x 2 + 6y 2 −2y 3 + 5 and its function values. with matlab code
채택된 답변
추가 답변 (1개)
reman
2023년 3월 3일
0 개 추천
Find the stationary points of the function f(x, y) = 8x 2 + 6y 2 −2y 3 + 5 and its function values. with matlab code
카테고리
도움말 센터 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!