add matrix to cell

1 回表示 (過去 30 日間)
vaya putra
vaya putra 2019 年 12 月 2 日
コメント済み: vaya putra 2019 年 12 月 2 日
i have matrix 25x25, i need reflaction matrix from line no 2 to 25
i was looking at using fliplr but i have a problem,
A=rand(25,25)
B=fliplr(A(2:25)) % only line no 2
C= nan(25,24)
for C=1:24
C(1,:)=fliplr(A(2:25));
end
this only reflaction in line no 2. to solve it
any comments

採用された回答

Bhaskar R
Bhaskar R 2019 年 12 月 2 日
I guese you want like this??
A=rand(25,25);
B=fliplr(A(2:25,:)); % only line no 2
C= nan(25,25);
C(2:25, :) = B; % assign reflection matrix to C where C first line values are NaNs
  1 件のコメント
vaya putra
vaya putra 2019 年 12 月 2 日
thx.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by