Can I run a function in for loop
显示 更早的评论
I am currently working on a project under which I have to capture a image then process the imge to obtain some data the whole code is in function.Now I like to to know whether I can run that function 100 times to process 100 such images to obtain data.
Attaching the screenshot of matlab script.

3 个评论
Stephen23
2018-12-3
The keyword function is only used to define a function, not to call it. When you worked through the introductory tutorials, which teach basic MATLAB concepts that beginners need to know (like how to call functions), did you see function being used anywhere to call a function?:
Tipu Sultan
2018-12-3
madhan ravi
2018-12-3
编辑:madhan ravi
2018-12-3
No the function name would be ball_detection save it in a function file(with the name ball_detection -> function file has to be saved with the name of the function ) and just call it like I told you in my answer
回答(1 个)
madhan ravi
2018-12-3
0 个投票
Just call the function inside the loop meaning remove the word function in the above photo you attached.
2 个评论
Tipu Sultan
2018-12-3
编辑:Tipu Sultan
2018-12-3
madhan ravi
2018-12-3
编辑:madhan ravi
2018-12-3
Anytime :)
"but I need to verify it in real time on my project so I will run it real time."
you are asking or informing?
类别
在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!