Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个矢量图
a = 1:4
我想得到
[4 3 2 1]
我应该使用哪个 matlab 函数?
连续使用
fliplr(a)
用于色谱柱
flipud(a)
另一种选择是使用索引
a(end:-1:1)
如果要反转的数组是 range a:b,那么使用起来要快得多:
a:b
-(-b:-a)