acceleration function not working in script?
Mostrar comentarios más antiguos
Hello, i'm trying to assign the value returned from the acceleration function in the mobiledev object
In the m variable I can see the acceleration values but when I call the acceleration function and assign its output to the variable 'x' nothing is in it.
When I run m.acceleration in the command window it works fine so why doesn't it work in this script?
Thanks

Respuestas (1)
Yongjian Feng
el 3 de Jul. de 2021
0 votos
In general, the debugger shall be able to show you the reason. Just run your Untitle2.m using the matlab debugger, and put a breakpoint in line 5. Then you can examine m directly.
4 comentarios
Will Isom
el 4 de Jul. de 2021
Yongjian Feng
el 4 de Jul. de 2021
Set a breakpoint at line 5, and when the debugger pauses there, copy line 5 and paste to the command line window. What do you get for x from the command line window?
Will Isom
el 4 de Jul. de 2021
Yongjian Feng
el 4 de Jul. de 2021
Oh, a time delay? The command line window somehow is slower than the function call? Where do you put the waitfor function?
Categorías
Más información sobre Reinforcement Learning en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!