join .m files together

4 次查看(过去 30 天)
i have 2 .m files one called battleship.m (main code) and the other battleship board.m
how do i show battleship board.m when i run the battleship.m so that i can see them both work together?

采纳的回答

Cris LaPierre
Cris LaPierre 2021-12-30
I think what you want is best answered by learning how to use the debugging tools in MATLAB. See the Debug MATLAB Code Files page. You can set a breakpoint in any code that will be run by your main code file, and execution will pause at the breakpoint, allowing you to inspect your variables at that point in the code execution.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by