matrix - Declaring two matrices in one line of code? Matlab 2014 -
,a simple question 1 have yet concrete answer. if have 2 matrices, , b , want make them both same size, 1x2 matrix of zeros. there way declare them both in 1 line of code? ask because in situation have on 10 matrices of same size want easier way declare them.
so @ first might think following (which not valid):
a,b = zeros(1,2)
the deal()
-function looking for. can distribute either 1 input several output-variables or distribute several input values several output values. need first case:
[a, b] = deal(zeros(1,2));
Comments
Post a Comment