how to put rand syntax in a matrix operation?

1 次查看(过去 30 天)
cellular=1:100
resource=[1 8;2 12;3 7;4 18;5 17]
ROM = [cellular(1:size(resource,1)).', sortrows(resource, 2)];
ROM = ROM(ROM
(:, end) > 5, :)
what changes i have to do,,if i want "cellular value choose the resource column2 value with >5 randomly(but onle column2 value can be choosed by cellular value max 5 times)nd after choosing display will be like :--
1 column:-cellular value column
2nd column:--resource column1
3rd column:--resource 2nd column

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by