Plot piecewise function with couple of kink points
Afficher commentaires plus anciens
Thank you so much beforehand if anyone could help me with this. I have used Matlab in the past. However, I am a bit overwhelmed trying to plot this piecewise function.
I need to plot a piece wise function (q) where the parameters are i2, r, sigma1, sigma2, sigma3, v and beta and the variable is i1. The function is:
q= 1 {if i1=(1+r)(1-sigma3/(sigma3+v*sigma2))+sigma3/(sigma3+v*sigma2)*(i2-v*sigma2)}
q=1-(i1-1/beta)/sigma1 {if i1>=sigma1*((i2-1/beta)/v*sigma2 -1) -1/beta}
q=1-(i1-r-1)/sigma1*(1-(sigma3/sigma1)*(1+sigma3/sigma1+sigma3/(sigma2*v))**(-1))+(sigma3/sigma1)*(1+sigma3/sigma1+sigma3/(sigma2*v))**(-1)*((i2-r-1)/v*sigma2-1) {if if i1<sigma1*((i2-1/beta)/v*sigma2 -1) -1/beta}
q=1-(i1-1/beta)/(sigma1+sigma3) {if sigma2=0 or v=0}
q=0 {if sigma1=0}
The values for the parameters is:
r=(1-beta)/beta
beta=0.9
i2=4
sigma1=0.1
sigma2=0.2
sigma3=0.7
v=0.5
I would greatly appreciate if anyone could show me how to do it for an array of values for i1 that has a range from 0 to 10 separated by 0.1.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Line Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
