Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
この2つのコマンドをMatlabで1つにマージするにはどうすればよいですか?
Temp = diag(diag(A)); X = Temp(:)
何かのようなもの
X = diag(diag(A))(:)
動作しません。
本当にやりたい場合は、次のことができます。
X = reshape(diag(diag(A)),[],1)
でも、そうすることであなたが多くを得ることができるかどうかはわかりません!