Hankel matrix, random entries

2 ビュー (過去 30 日間)
Hajar Alshaikh
Hajar Alshaikh 2023 年 4 月 8 日
コメント済み: Hajar Alshaikh 2023 年 4 月 9 日
i have a hankel matrix X:
row1 = 1:n;
col1 = (n+1):(2*n-1);
% Create the full-rank Hankel matrix of size n^2
H_full = hankel(row1, col1);
% Compute the low-rank approximation
[U,S,V] = svd(H_full);
U = U(:, 1:r);
S = S(1:r, 1:r);
V = V(:, 1:r);
X = U*S*V';
and i want to select random anti digonals and let them in a set called omega
for example i have 5×5 matrix and I want to choose two random anti diagonals and let the indices of the entries belong to these inside a set called omega . so in the 5 by 5 matrix there are 9 anti diagonal and i want to choose second and fourth antidiagonals so omega ={(1,2),(2,1),(1,4),(2,3),(3,2),(4,1)}
  11 件のコメント
Hajar Alshaikh
Hajar Alshaikh 2023 年 4 月 9 日
i want the indices stored as 1×n matrix as the output
Hajar Alshaikh
Hajar Alshaikh 2023 年 4 月 9 日
i am not that much good with matlab, i dont know if you understand what i want correctly or not

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeOperating on Diagonal Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by