How can i implement this in matlab

1 view (last 30 days)
syed ali
syed ali on 30 Apr 2018
Commented: Stephan on 1 May 2018
r=5; re=3; ci={xi,yi,r}
Where xi, yi are random values of on grid
P is a point on grid (x,y)
d(ci,p)=sqrt((xi-x)^2+(yi-y)^2);
Then
Pcov(x,y,ci)= 1 if d(ci,p)<r-re
else exp(-0.5*(d(ci,p)-(r-re))^0.5) if r-re<d(ci,p)
else 0
  3 Comments
syed ali
syed ali on 30 Apr 2018
How can i implement this logic r=5; re=3; ci={xi,yi,r}
Where xi, yi are random values of on grid
P is a point on grid (x,y)
d(ci,p)=sqrt((xi-x)^2+(yi-y)^2);
Then
Pcov(x,y,ci)= 1 if d(ci,p)<r-re
else exp(-0.5*(d(ci,p)-(r-re))^0.5) if r-re<d(ci,p)
else 0

Sign in to comment.

Answers (0)

Categories

Find more on Modeling in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!