Fatiha
Followers: 0 Following: 0
Hi, Please how I can improve my loops bellow:
n=184;
c=0; comp=0
D=zeros(n*(n-1)/2+n_obs*n,1);
for i=1:n
for j=i+1:n
c=c+1;
p=norm(Q(:,j)-Q(:,i));
D(c)=p-R(i)-R(j);
% possibilite de contact
if D(c)< d_risk_pp
comp=comp+1;
contact(comp,1)=i;
contact(comp,2)=j;
p=norm(Q(:,j)-Q(:,i));
E(:,comp)=(Q(:,j)-Q(:,i))/p;
end
end
end
Professional Interests: Mathematic models
Statistics
1 Question
0 Answers
RANK
114,826
of 300,930
REPUTATION
0
CONTRIBUTIONS
1 Question
0 Answers
ANSWER ACCEPTANCE
0.0%
VOTES RECEIVED
0
RANK
of 21,114
REPUTATION
N/A
AVERAGE RATING
0.00
CONTRIBUTIONS
0 Files
DOWNLOADS
0
ALL TIME DOWNLOADS
0
RANK
of 171,750
CONTRIBUTIONS
0 Problems
0 Solutions
SCORE
0
NUMBER OF BADGES
0
CONTRIBUTIONS
0 Posts
CONTRIBUTIONS
0 Public Channels
AVERAGE RATING
CONTRIBUTIONS
0 Discussions
AVERAGE NO. OF LIKES
Feeds
Question
execution of code very long
Hi, I need help to improve the following code. The execution is too long 79.014s function [Dmin]=dist_am(Q,R,Obs,N,d,n_obs...
13 years ago | 1 answer | 0