Can a MATLAB script run silently?

I want to run a script in MATLAB without the script displaying a lot of stuff. I'm looking for the equivalent of the instruction "@echo off" that can be used to run batch files in Windows.

 采纳的回答

Matt Fig
Matt Fig 2011-3-14

4 个投票

Why would the script be displaying anything? Go through the script and make sure there are no calls to DISP, and every line ends in a semi-colon. Then the script shouldn't be dumping anything to the command line.

2 个评论

Yeah, the old trick of the semicolon. Thanks!

请先登录,再进行评论。

更多回答(1 个)

Walter Roberson
Walter Roberson 2011-3-14

3 个投票

evalc() the script and throw away the output.

2 个评论

Thanks. That's a good trick too.
cool exactly what I was looking for!

请先登录,再进行评论。

类别

在 帮助中心 和 File Exchange 中查找有关 Scripts 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by