【发布时间】:2020-08-12 15:15:43
【问题描述】:
我希望我的索引结构的字段具有类似索引在不同向量中的值:
struc(1:3).value=1:3
但是,这会产生错误"Expected one output from a curly brace or dot indexing expression, but there were 2 results."
将赋值行的左侧或右侧括在方括号中没有帮助。而且我认为deal 不合适,因为它只是分配相同的值,而不是在向量中分配一对一的值。
除了使用 for 循环之外,我怎样才能实现这个变量赋值?使用 Matlab 2016a。
【问题讨论】:
标签: matlab