Why does the C scanf function not work in my MEX-file in MATLAB?
Show older comments
I have a C MEX-file, and I would like to have that file prompt the user for input when the file is run. To do this, I am using the C scanf function, which reads information from standard input. Here is the relevant code I am using:
printf("Enter number of minutes (0 - 59) = ");
scanf("%d", #_minutes);
However, when this file is executed, the scanf function appears to be ignored, and the rest of the code is executed without waiting for user input.
Accepted Answer
More Answers (0)
Categories
Find more on Fortran with MATLAB in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!