matlab - How was this result obtained? -


when ran following command in matlab:

x=zeros(size(30,1),1) 

i got 1x1 double matrix value 0.

how that?

thanks.

size(30,1) returns the number of rows (indicated size(a,1)) of "matrix" 30. since matrix has 1 element, number of rows 1 means x 1x1 matrix of zeros.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -