What's the difference between % and %% for comments?

前端 未结 3 1063
傲寒
傲寒 2021-02-13 06:35

The MATLAB editor automatically highlights all content after %% comments, and text after %% in the same line are turned bold. But what\'s the essential

3条回答
  •  醉话见心
    2021-02-13 06:51

    One percent sign (%) is used for commenting lines.

    Two percent signs (%%) have a different purpose: they are used for dividing your code into sections, which can be run independently. This allows easier debugging.

提交回复
热议问题