Can anyone knowledge me what is the meaning of this syntax?

조회 수: 2 (최근 30일)
Ahmad Nur Hasybi
Ahmad Nur Hasybi 2022년 6월 7일
댓글: Jan 2022년 6월 7일
S=stepinfo(ScopeData(1:size(ScopeData,1),2),ScopeData(1:size(ScopeData,1),1));
bright(i,1)= mean(ScopeData(round(S.SettlingTime*1000):size(ScopeData,1),2));
bright(i,2) = S.SettlingTime;
bt(i,1) = (200- mean(ScopeData(round(S.SettlingTime*1000):size(ScopeData,1),2)))/10+S.SettlingTime;

답변 (1개)

Jan
Jan 2022년 6월 7일
Start with simplifying the code:
S = stepinfo(ScopeData(:, 2), ScopeData(:, 1));
STime = S.SettlingTime;
bright(i,1) = mean(ScopeData(round(STime*1000):end, 2));
bright(i,2) = STime;
bt(i,1) = (200 - bright(i,1)) / 10 + STime;
What is not clear now? Should we eplain the + operator or that ScopeData(:, 1) extracts the 1st column? Please ask explicitly, what is unclear. Explaining all would be as exhaustive as writing a book about how Matlab works.
Did you read the documentation of the used commands already? See e.g. stepinfo .
  댓글 수: 2
Ahmad Nur Hasybi
Ahmad Nur Hasybi 2022년 6월 7일
shich was called by scopedata? because in simulink i have many scopedata to monitor
Jan
Jan 2022년 6월 7일
@Ahmad Nur Hasybi: I do not understand, what you mean. Are you asking, where the variable ScopeData is coming from? Not from inside the code you have posted.

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

카테고리

Help CenterFile Exchange에서 Naming Conventions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by