how can I call a class in a gui?

조회 수: 10 (최근 30일)
jibs
jibs 2021년 9월 14일
댓글: jibs 2021년 10월 25일
Hi! im working on OOP, I have defined a class TimeData by a script and its saved in the working folder.
now how can i call that class in my GUI. Should i call in opening function. or in any button?
  댓글 수: 1
TADA
TADA 2021년 9월 14일
There's no general rule. can you please elaborate a little on the context?

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

답변 (1개)

Matt J
Matt J 2021년 9월 14일
I have defined a class TimeData by a script
Don't you mean you defined it in a classdef file? The constructor function for a class can be called from anywhere, as long as the classdef file is on the Matlab path. In particular, the current folder is always on the Matlab path.
  댓글 수: 3
Matt J
Matt J 2021년 9월 17일
You haven't shown us the error messages that you get when you try to call it. There's no reason why you shouldn't be able to.
jibs
jibs 2021년 10월 25일
I have defined the class using classdef the name of class is TimeData, i have not defined its functions yet in class.

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

카테고리

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