This is a hard question to google. I am new to Matlab and have seen the following statement, but I can't see how it does anything. What doe x = x(:) do?
:
is the colon operator. In this context, it reshapes x
to a one-dimensional column vector.
So this code:
x = [ 1 3
2 4 ];
x = x(:);
disp(x)
results in:
1
2
3
4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With