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.
如果我有:
vec = 1:10
是否有一个函数可以将所有元素相乘(1 * 2 * 3 * 4 * 5 ...)而不需要for循环?
谢谢!
使用功能 prod :
vec = 1:4; prod(vec) ans = 24