how do i plot a complicated function

1 Ansicht (letzte 30 Tage)
atpsafa saputra
atpsafa saputra am 11 Mai 2021
Beantwortet: Stephan am 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])

Antworten (1)

Stephan
Stephan am 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])

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by