Passing an axes handlle to a function
이전 댓글 표시
I have created a function in which I want to be able to take an image from an axes1 component and redraw on another axes component...with this target axes component being passed as n argument. This is my attempt:
The function:
function rescaleImage(handles,str)
%Get image on axes1
axes(handles.axes1)
image1=getimage(handles.axes1);
%Create handle for new placement of image
%Use str argument to pass the axes handle.
str2func(str)
imshow(image1,[])
Calling the function to redraw the image onto axes3.
rescaleImage(handles,'handles.axes3')
There is no error message, but the image does not redraw on axes3.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!