问题
Is there a MATLAB shorthand for
v( 1:length(v)-1 ) % everything except last element
In Python, its
v[ :-1 ]
Does MATLAB have a similar shorthand?
回答1:
v(1:end-1)
来源:https://stackoverflow.com/questions/5411335/matlab-everything-except-last-element