Section break insertion after function

조회 수: 5 (최근 30일)
Ruslanas Kryzanauskas
Ruslanas Kryzanauskas 2022년 12월 13일
편집: DGM 2023년 6월 2일
Hello, why I can't add a section break after this function? Thanks.
function garsas = styga( fs, fd, trukme )
N=round(fd/fs);
ts=3;
K=fd*ts-N;
noi=rand(1,N);
null=zeros(1,K);
x=[noi, null];
a=[1 zeros(1,N-2) -0.5 -0.5];
b=1;
signal=filter(b,a,x);
avg=mean(signal);
wk=signal-avg;
normalised=wk/max(wk);
end
  댓글 수: 2
Rik
Rik 2022년 12월 13일
There is no fundamental reason why not. What makes you think it is impossible?
DGM
DGM 2023년 6월 2일
편집: DGM 2023년 6월 2일
The discussion here is vague about the matter, so let me put a point on it. Considering that this is a behavior that doesn't exist in R2019b, I'm going to assume that this is another "feature" of the new editor.

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2022년 12월 13일
I don't know. That's the way it is. When you have a script followed by functions, you can have section breaks in the script part by putting a %% in there to start the section. However it seems to make all the functions listed after the last section of the script as part of the same section. Don't worry though, it only goes into the function and executes it if the function is actually called. It really doesn't matter that the margin highlighting shows all the trailing functions as part of the last section.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by