Could somebody please help me with Object-Oriented Programming in MATLAB?

조회 수: 7 (최근 30일)
Susan
Susan 2021년 6월 24일
편집: Susan 2021년 6월 25일
Hi All,
I am working on a script that call a "classdef" function and I need to have access to a value in this "classdef". Could sombody please tell me how I can do that? Any tutorial/good references to help me to learn/underestand this class definition would be appreciated too.
Here is one classdef example from MATLAB
classdef helperBLEChannelClassification < ble.internal.ConfigBase
properties
.......
end
methods
function classifyChannels(obj, connectionConfig)
per = .....
end
end
% SL: Snipped the rest
end
[SL: Please do not post the full text of MathWorks functions or classes.]
In the main script (link to the example ) this helper function is called as
channelClassification = helperBLEChannelClassification(...)% With the desired inputs
However, I'd like to get the "per" value in the "function classifyChannels(obj, connectionConfig)" as an output whenever I call this "channelClassification" function. Any idea?
Many many thanks in advance
  댓글 수: 3
Steven Lord
Steven Lord 2021년 6월 24일
Since this is a helper function for an example, you could just link to the example and state which of the helper classes you're interested in.
Posting just the function declaration line (the one that starts with the function keyword) for the method in which you're interested should be okay, to show the signature of the method.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Software Development Tools에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by