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.FunForLoop.PNG

3 Kommentare

Stephen23
Stephen23 am 3 Dez. 2018
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
Tipu Sultan am 3 Dez. 2018
That mean I will save the fuction tri (in my case),in a file then open a new file to call the tri function inside the for loop.Am I correct!
madhan ravi
madhan ravi am 3 Dez. 2018
Bearbeitet: madhan ravi am 3 Dez. 2018
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

Melden Sie sich an, um zu kommentieren.

Antworten (1)

madhan ravi
madhan ravi am 3 Dez. 2018

0 Stimmen

Just call the function inside the loop meaning remove the word function in the above photo you attached.

2 Kommentare

Tipu Sultan
Tipu Sultan am 3 Dez. 2018
Bearbeitet: Tipu Sultan am 3 Dez. 2018
Okay Thanks,but I need to verify it in real time on my project so I will run it real time.
madhan ravi
madhan ravi am 3 Dez. 2018
Bearbeitet: madhan ravi am 3 Dez. 2018
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?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange

Produkte

Gefragt:

am 3 Dez. 2018

Bearbeitet:

am 3 Dez. 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by