Insert lines from "figure" on Matlab code

I plot a figure on matlab and i want to insert a line from the figure window inside my plot and view it again on the next run. I right click the line and choose the "show code" option to view the code and the new m file that has been created with a function name.How do i import this code on my main m.file?
fig1.jpg
fig3.jpg

답변 (1개)

Walter Roberson
Walter Roberson 2019년 1월 27일

0 개 추천

If you are inside a GUIDE GUI callback, then
fig = ancestor(hObject, 'figure');
createline2(fig);

카테고리

도움말 센터File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

질문:

kpl
2019년 1월 27일

답변:

2019년 1월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by