I have a cell(matrix) of size 100*100.I need to scan each column and choose 4 consecutive random cells( (1*1)*4) for assigning values.Can anyone please help me with this?
In my case 97 wouldn't work.I do not always have 100 rows(question was generally asked).It would throw an error if I put randi (A(end))+(0:3) (A here is my array,say).
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
2 Comments
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/568746-random-selection-of-a-cell#comment_945453
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/568746-random-selection-of-a-cell#comment_945453
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/568746-random-selection-of-a-cell#comment_945606
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/568746-random-selection-of-a-cell#comment_945606
Sign in to comment.