I am working on obstacle avoidance and path following code. For which I have made different functions in matlab. My question when ever I run them it says "Not enough input arguments".Is this is the problem with Matlab software ,I am using R2017a.
Show older comments
code for obstacle drawing
function drawObstacles(obstacles)
if(~ isempty(obstacles))
plot(obstacles(:,1), obstacles(:,2), '.k'); %plot the obstacles
end
9 Comments
Walter Roberson
on 27 Aug 2018
How are you invoking this code?
passioncoding
on 27 Aug 2018
madhan ravi
on 27 Aug 2018
He is asking that how you call the function , can you show us how you are calling it?
Walter Roberson
on 27 Aug 2018
For example, are you running this code by being in the editor displaying the code and pressing the green "Run" button?
passioncoding
on 27 Aug 2018
madhan ravi
on 27 Aug 2018
You should not run a function file . Read the link below:
https://www.mathworks.com/help/matlab/ref/function.html
Rik
on 27 Aug 2018
I you use the green run button, the default is to run the function without any inputs. So you should either use the dropdown under the run button to insert your variable, or you should write the code in a script or in the command windown.
passioncoding
on 27 Aug 2018
passioncoding
on 27 Aug 2018
Answers (0)
Categories
Find more on Robotics 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!