-2

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.

halfer
  • 19,824
  • 17
  • 99
  • 186
B747
  • 21
  • 1
  • You have mentioned that `s` and `i` are a function of another parameter (time). Do you know the values of `s` and `i` directly in this example though? If so, can simply `plot(s,i)` be a solution to you? – If_You_Say_So Apr 05 '20 at 19:28
  • 1
    Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Apr 05 '20 at 19:37
  • no i don't know the value of s and i for this particular equation since they are changing with time – B747 Apr 05 '20 at 19:39
  • 1
    @halfer sorry for such word usage i agree – B747 Apr 05 '20 at 19:41

1 Answers1

1

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])
FangQ
  • 1,444
  • 10
  • 18