How can I call a function inside a class in the command window?
조회 수: 14 (최근 30일)
이전 댓글 표시
I'm new to matlab and I want to call a function contained inside a class in the comand window to run it. The method is not static. How can I do it? Also is there a simpler way to run the function? Also what is obj?
classdef my_class
properties
param
end
methods
function [x,y] = my_function(obj,a,b)
....
end
end
end
댓글 수: 3
Ameer Hamza
2020년 4월 5일
Jay, is the value name of the .txt file (a char array)? You can still call any public method of a class using the syntax described by Tommy.
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Software Development Tools에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!