MATLAB plot of 2 variables defined by an equation

265 Views Asked by At

I have the following query. I want to plot in MATLAB the following equation :

i + s - ln(s)/sigma = constant (i and s are variables)

for a given value of constant and sigma. The equation is between s and i. the value of sigma is 0.5 and value of constant can be assumed to be 1.

I want to plot the above equation. i and s both are function of time but in graph we need graph of s & i only. i on y axis and s on x axis.

1

There are 1 best solutions below

3
FangQ On

try fimplicit

https://www.mathworks.com/help/matlab/ref/fimplicit.html

f=@(s,i) i + s - log(s)/2 - 5;
fimplicit(f,[1 5 2 10])