Matlab如果x = 0×1空双列向量

zbsbpyhn  于 8个月前  发布在  Matlab
关注(0)|答案(1)|浏览(140)

正确的语法是什么

if x = 0×1 empty double column vector

x = 5

end

我试过这个:

if x == [] 

x = 5

end

但它似乎不起作用,我不知道还能怎么做。
换句话说,当我尝试将x写入某个东西时,我会得到这个错误消息:Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 0-by-1.,所以我试图实现一些东西,只是使x为零,而不是空的。

相关问题