Community Profile

photo

Bushra Atta Khakwani khakwani


Last seen: 10 months ago Active since 2022

Followers: 0   Following: 0

Statistics

  • Thankful Level 1

View badges

Feeds

View by

Question


i want to generate random matrix "P" but every alternate entry in each of the column is repeating
for i = 1:22 for j=1:22 if mod(j,2)==0 P(j,i) = y_random(i); %y coordinate else P(j,i) = x_ran...

1 year ago | 0 answers | 0

0

answers

Question


I want to only run my loop till 22 but it shoud take odd numbers for x_random and even for y_random
while i < 22 if mod(i,2)==0 P(2,i) = y_random(i); %y coordinate else P(1,i) = x_random(i); %x coord...

1 year ago | 1 answer | 0

1

answer