科迪
Change the element of the vector with respect to the element of the direction vector
If the element of the direction vector is 2, then the new element of the vector is two times the corresponding element in the vector.
If the element of the direction vector is 1, then the new element of the vector is two times the corresponding element in the vector minus one.
Attention: 'if' can not be used
Example
direction vector d = [1 2 2 2 1 2 1 2] vector = [1 2 3 4 5 6 7 8] new_vector = [1 4 6 8 9 12 13 16]
解决方案522958
有趣的。[d == 1]的cody尺寸大于(d == 1)。关于为什么有什么想法吗?
支架是“固定元素”操作,因此将其解释为额外的操作。表达式[1:10]具有与(1:10)相同的含义(结果),但是在第一种情况下,您已经执行了额外的操作(在这种情况下不需要)。以同样的方式使用[1 5],但是如果使用(1 5),您会成为错误,因为与简单的括号没有串联。
好的。感谢您的解释,J.R。
Times 2 - START HERE
73594求解器
"mirror" matrix
468 Solvers
2倍してみよう - ここからスタート!
374 Solvers
初学者的问题 - 平方
617求解器
黄金比率
139 Solvers
输入数量
71个求解器
İmage系列2和
21个求解器
重塑矢量
105个求解器
İmage Series 1 OR
20 Solvers
矩阵结构
72 Solvers
在Matlab Central中找到宝藏,发现社区如何为您提供帮助!
Select a Web Site
选择一个网站以获取可用的翻译内容,并查看本地事件和优惠。根据您的位置,我们建议您选择:。
You can also select a web site from the following list:
选择中国网站(中文或英语)以获得最佳场地性能。其他Mathworks乡村网站未针对您所在的访问进行优化。
Contact your local office