I would like to create a truncated random matrix in MATLAB for certain simple test, please let me know if you have any suggestion:
Let n to be large (say n=1,000). We first create a symmetric square matrix M of size n by n, where the diagonal and the upper-diagonal entries are iid Bernoulli (taking values -1,1 with equal probability).
In the next step, I would like to remove the first m columns from M (say m=10), and let M' be the remaining matrix (thus M' has size n by (n-m)).
How to create M and M' in an efficient way?
Thank you.
Aucun commentaire:
Enregistrer un commentaire