MATLAB Code Error Help

조회 수: 3 (최근 30일)
Curious Mind
Curious Mind 2020년 4월 5일
댓글: Ameer Hamza 2020년 4월 5일
I have a matlab code which is gui based. I am using this code in Matlab 2019b for the first time. The code works in 2017a. below are the errors I am getting:
Error using handle.handle/get
Invalid or deleted object.
Error in centerfig>localPlaceHGFig (line 95)
f1u = get(F1,'Units');
Error in centerfig (line 27)
xy = localPlaceHGFig(F1,F2);
Error in step0 (line 53)
'Position',centerfig([0.330078 0.391927 0.341797 0.13875])...
What does these mean? the code worked fine in 2017a version. I must also say I am now running this code on my laptop instead of a desktop computer. Is the 'Position' an issue?
Thank you

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 4월 5일
It shows that the graphic object you are trying to change is already deleted. I think that you accidentally closed the figure window and then run these lines of code. Try to rerun this code after closing all the figures currently opened and cleaning the workspace
close all
clear
  댓글 수: 4
Curious Mind
Curious Mind 2020년 4월 5일
thanks! would it be an m-file? something like new_wk.m? or just a function
Ameer Hamza
Ameer Hamza 2020년 4월 5일
Yes, It shoule be a seperate file named new_wk.m.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by