concatenated matrix - factoring out a matrix coefficient

2 ビュー (過去 30 日間)
Viesturs Veckalns
Viesturs Veckalns 2017 年 10 月 16 日
編集済み: Cedric 2017 年 10 月 16 日
A, B and C are MxN matrices. I construct a matrix D in the following way:
D = [A./C, B./C]
It is inviting to bring out the coefficient ./C
D = [A, B]./C
however this change conflicts Matlab rules [A, B] being an Mx2N matrix and ./C being an MxN matrix.
Is there a convenient way in Matlab to factor out a matrix coefficient?

採用された回答

Cedric
Cedric 2017 年 10 月 16 日
編集済み: Cedric 2017 年 10 月 16 日
D = [A, B]./[C, C]
which isn't more convenient than the initial expression! Depending the context, you can REPELEM or REPMAT C as many times as necessary if this is not always 2, but there is no easy shortcut or simple automatic expansion that I can think of.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by