Why does the calling of static method from another m file doesn't set the parameters?
조회 수: 1 (최근 30일)
이전 댓글 표시
In Test.m
[x, ServiceObj] = Utilities.changeDetection(ServiceObj, y,z);
When I call it, I have index exceeds dimensions. By debugging although ServiceObj, y,z are initialised, I cannot see their values in Utilities.m Note that ServiceObj is an object from ServiceClass which I defined as follows ServiceClass < handle
댓글 수: 2
Image Analyst
2017년 1월 6일
What toolbox is ServiceClass in? List it in the Products section below.
You forgot to attach your test.m and Utilities.m files, so we can't see, try, test, or fix anything. All I can say is that you have a bug in your program, or you're not passing in the correct things it expects, or it's a scope issue.
John BG
2017년 1월 7일
Show the function contents and your call.
If you have defined the variables inside a function and then you want to access them, you have to pass them in the function declaration header.
Better would be, to declare the variables outside the function, pass them to the function, and recover them modified variables with the correct declaration of the function.
show the function and the call
awaiting answer
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Whos에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!