필터 지우기
필터 지우기

how do i plot a complicated function

조회 수: 2 (최근 30일)
atpsafa saputra
atpsafa saputra 2021년 5월 11일
답변: Stephan 2021년 5월 11일
i tried to plot a function but it only produced an empty image
clc;
clear all;
alpha = 2;
gamma = 3;
k1 = 0.5;
k2 = 0.15;
eta = @(x,y)(sqrt((x*k1+gamma*(1-y)-alpha)^2-4*x.*(gamma*k2*(1-y)-alpha*k1))-(x*k1+gamma*(1-y)-alpha))/(2*x);
F = @(x,y)alpha-2*x.*eta-(k1*(alpha-x.*eta))/(x+k1)-(1-y);
fimplicit(F,[-20 20 -20 20])

답변 (1개)

Stephan
Stephan 2021년 5월 11일
alpha = 2;
gamma = 3;
k1 = 0.5;
k2 = 0.15;
syms eta(x,y) Eta
eta(x,y) = (sqrt((x*k1+gamma*(1-y)-alpha)^2-4*x.*(gamma*k2*(1-y)-alpha*k1))-(x*k1+gamma*(1-y)-alpha))/(2*x);
F(x,y) = alpha-2*x.*Eta-(k1*(alpha-x.*Eta))/(x+k1)-(1-y);
fun = subs(F,Eta,eta)
fun(x, y) = 
fimplicit(fun,[-2 1 -50 20])

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by