Why define class methods that have attributes in the classdef block?

조회 수: 2 (최근 30일)
Jim Hokanson
Jim Hokanson 2012년 5월 27일
편집: per isakson 2017년 11월 11일
Hi all,
I was wondering if anyone knew why you needed to declare the signature of methods with attributes inside the classdef block when defining the function in a separate file? I often find that I created a mismatch between what the signature was originally and how it is currently defined in the function file. The errors aren't that helpful either, e.g. "Too many input arguments." I could understand if just the function name were necessary, as this would allow keeping all of the attributes in a single file. The "normal" methods don't need a signature in the classdef block. What gives?
Thanks, Jim

답변 (0개)

카테고리

Help CenterFile Exchange에서 User-Defined Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by