フィルターのクリア

how to define a matrix element in matlab

2 ビュー (過去 30 日間)
marwa hajji
marwa hajji 2022 年 9 月 29 日
回答済み: Image Analyst 2022 年 10 月 2 日
any help please , I need to replace the first colunm in matrix with diffrent size by another value!!!
as example :
input
A=[1 2; 3 4];
B=[5 6; 7 8; 9 1; 1 4];
Output
B=[1 2; 3 4 ;9 1; 1 4]

採用された回答

Matt J
Matt J 2022 年 9 月 29 日
編集済み: Matt J 2022 年 9 月 29 日

その他の回答 (2 件)

Torsten
Torsten 2022 年 9 月 29 日
A=[1 2; 3 4];
B=[5 6; 7 8; 9 1; 1 4];
B(1:2,1:2) = A;
B
B = 4×2
1 2 3 4 9 1 1 4

Image Analyst
Image Analyst 2022 年 10 月 2 日
To learn how to do this and other very basic things, invest two hours here:

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by