我想使用条件或if函数替换向量的元素。
a = [10 20 60];
如果a <30 = 4否则a = 5
结果需要如下所示:
b = [4 4 5]
matlab replace vector conditional-statements
conditional-statements ×1
matlab ×1
replace ×1
vector ×1