Info

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

n*2 matrix which come from output--Row is not fixed but column is 2--- and that process rotate in loop 10 times save all values of loop in result matrix

1 vue (au cours des 30 derniers jours)
a=18;
b=22;
for i=1:10
r1 = randi([18 22],1,1)
name= (b-a).*rand(r1,2) + a
end
save this all name matrix values which generate in each loop save in result matirx
  2 commentaires
Jan
Jan le 8 Avr 2017
The question is not clear. Please show us a small example.
Pratik Anandpara
Pratik Anandpara le 9 Avr 2017
a=18:
b=22;
for i=1:10
r1 = randi([18 22],1,1)
name= (b-a).*rand(r1,2) + a
end
save this all name matrix values which generate in each loop save in result matirx

Réponses (1)

Jan
Jan le 12 Avr 2017
A guess:
name = cell(1, 10);
a = 18:
b = 22;
for i = 1:10
r1 = randi([18 22],1,1);
name{i} = (b-a) .* rand(r1, 2) + a;
end

Cette question est clôturée.

Tags

Aucun tag saisi pour le moment.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by