counter odd numbers in 'randi'?
1 view (last 30 days)
Show older comments
tomer kapuri
on 2 Dec 2018
Commented: tomer kapuri
on 3 Dec 2018
counter of odd numbers in 'randi'?
this is program:
a=randi([0 27],1,50);
b=zeros(1,numel(a)*3+numel(a));
b(4:4:end)=a(:)
what is need write after that?
0 Comments
Accepted Answer
More Answers (1)
madhan ravi
on 2 Dec 2018
Edited: madhan ravi
on 2 Dec 2018
a=randi([0 27],1,50);
b=zeros(1,numel(a)*3+numel(a));
b(4:4:end)=a;
b(rem(b,2)~=0 & ~isprime(b))
2 Comments
See Also
Categories
Find more on Verification, Validation, and Test in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!