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 Center および File ExchangeLine Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by