I have to create a random matrix m*n where m and n are user inputs.
Now i have to fill the matrix with random nos. Finally I must have a matrix where each value is either 0 , 1 , a fraction no between 0 and 1, and also sum of each column should be equal to 1. how should i create the matrix ??

thanks for help... :)

Recommended Answers

All 2 Replies

Since I would write the code differently in C or C++ maybe you need to specify the target language first?

Plus, this question is on the web so there's that.

I have to create a random matrix

You have to, so why should WE have to?
Show us your efforts, maybe we'll help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.