assign data satisfied rules given
显示 更早的评论
i want to insert data randomly and it data must satisfied the rules given. for example, i want to insert 3 type of data (33,22,11) randomly in 22x7 and it must satisfied the rules. let assume i already have data that contain 33,22,11(data) randomly in 22x7 and saved in mat files.how to create a function that satisfied the rules to update that data
(there have 7 column and 22 row)
for every column there should satisfied,
Rules 1
11>=60% of 22
22<=20% of 22
33<=20% of 22
Rules 2
for every row,there must have only one data of 44.
1 个评论
Jan
2011-5-11
The question is unclear. What does "insert 3 type of data (33,22,11) randomly in 22x7" mean? "11 >= 60% of 22"?! 11 is greater than 60% of 22 (==13.2), but 22 is never smaller equal 20% of 22.
At first you state, that you want to insert 3 types of data, but in the last line a 4th value (or type?) appears suddenly.
Please edit your question and clarify your problem with more details.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!