while using "find" on a vector I get "Empty matrix: 1-by-0" on certain values
Show older comments
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!
Accepted Answer
More Answers (0)
Categories
Find more on Arduino Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!