how do i plot a complicated function

1 visualización (últimos 30 días)
atpsafa saputra
atpsafa saputra el 11 de Mayo de 2021
Respondida: Stephan el 11 de Mayo de 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])

Respuestas (1)

Stephan
Stephan el 11 de Mayo de 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])

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by