开发者

how to get first and last column of a matrix in MATLAB?

开发者 https://www.devze.com 2023-01-12 02:31 出处:网络
I have a matrix lets say: a = 401.4800344.0900305.0300462.2100310.0600397.3400502.5900 547.7100429.9600540.3400737.3600491.4700474.7400735.8700

I have a matrix lets say:

a =
    401.4800  344.0900  305.0300  462.2100  310.0600  397.3400  502.5900
    547.7100  429.9600  540.3400  737.3600  491.4700  474.7400  735.8700

I want to get the first and l开发者_高级运维ast columns only so that:

b = 
    401.4800  502.5900
    547.7100  735.8700


b = a(:,[1,end])

This means: all rows (:), first and last column ([1,end]).

0

精彩评论

暂无评论...
验证码 换一张
取 消