while using "find" on a vector I get "Empty matrix: 1-by-0" on certain values
显示 更早的评论
Hi, I'm trying to make a program that takes values from a potentiometer into an Arduino but I keepp having the same problem where certain values in a vector (y=0:0.1:5) like 3.6 gives me the "Empty matrix: 1-by-0" error, here is an example of this problem
clc
y=0:.1:5;
for i=y
i;
j=round(i,1);
hp=find(y==j)
end
I think that round part is part of the problem but I need it for my program, help!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Arduino Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!