how do i plot a complicated function

1 vue (au cours des 30 derniers jours)
atpsafa saputra
atpsafa saputra le 11 Mai 2021
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])

Réponses (1)

Stephan
Stephan le 11 Mai 2021
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])

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by