필터 지우기
필터 지우기

MATLAB Puts One space between %'s (Comment)

조회 수: 2 (최근 30일)
tinkyminky93
tinkyminky93 2022년 4월 7일
편집: Fangjun Jiang 2022년 4월 7일
Hello,
I am using shortcut of commenting which is CTRL+R but MATLAB puts one space between %'s. As you know, when we enter two %'s, it divides the code block. (%%) But I have to delete the spaces between them manually. What is the problem and how can I solve it? Thank you
Normal situation: (CTRL +R) + (CTRL +R) --> %%
My situation: (CTRL +R) + (CTRL +R) --> % %

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2022년 4월 7일
편집: Fangjun Jiang 2022년 4월 7일
I think that is the exact reason to add "%" and a space for "Ctrl+R", to avoid making "%%" by pressing "Ctrl+R" twice.
Adding "%%" is called Insert Section. You can add your own shortcut by MATLAB Preferences, Keyboard, Shortcuts.
Press "Ctrl+T" twice can remove the section.

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by