I am using randi
to generate integers in a range. But a strange thing is happening. When i run my matlab code then it produces wrong result giving 1*28 array.Here is what i have tried
last_sum=500;
curr_sum=1000;
r=randi([last_sum curr_sum],1,600);
Obviously it should generate a 1*600 array within range from 500 to 1000 but it is generating values between 1 and 28.Strange thing is that when i debug instructions one by one then it produces correct results. What thing i am doing wrong? Thanks
Aucun commentaire:
Enregistrer un commentaire