Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

How to handle this loop?

1 vue (au cours des 30 derniers jours)
Abhinav
Abhinav le 22 Mar 2015
Clôturé : MATLAB Answer Bot le 20 Août 2021
I have a loop in my code as below
for i=1:n-1
k=1:sz1;
temp=rand(1,sz1)
if temp(1,:)<=0.6
QAKAN1(i,k)=QAKAN11(:,k).*temp(:,k)
QAKAN11=QAKAN11(:,k)-QAKAN1(i,k)
end
end
QAKAN1
where 'n' and 'sz1' are integers. The problem is that if temp is greater than 0.6, it is executing the loop and returning the result as 0.
0 0
182.93 1789.8
0 0
249.72 682.57
Please help in solving the problem.
QAKAN11= 1125 3323

Réponses (0)

Cette question est clôturée.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by