Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

How to handle this loop?

1 visualizzazione (ultimi 30 giorni)
Abhinav
Abhinav il 22 Mar 2015
Chiuso: MATLAB Answer Bot il 20 Ago 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

Risposte (0)

Questa domanda è chiusa.

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by