外部.m文件中的Matlab应用调用函数

问题描述

我想在应用程序中调用getPhoto(),而getPhoto()是到同一目录中另一个.m文件的函数。

应用代码

jku

getPhoto()代码

properties (Access = public)
    fullname % Description
    ImageFile % Description
end
  

% Callbacks that handle component events
methods (Access = private)

    % Button pushed function: CaricaimmagineSRButton
    function CaricaimmagineSRButtonPushed(app,event)
        getPhoto();
        test = app.fullname;
        answer = questdlg('do you wanna crop?',...
            'Dessert Menu',...
            'Yes','No','No');
        % Handle response
        switch answer
            case 'Yes'
                app.ImageFile = imcrop(app.ImageFile);
                close Figure 1;
            case 'No'
        end
        
        app.ImageFile = imresize(app.ImageFile,[300 200]);
        app.TextArea.Visible = false;
        app.UIAxes.Visible = true;
        imshow(app.ImageFile,'Parent',app.UIAxes);
        
    end

使用getPhoto()我想选择照片并将名称和照片传递给应用程序。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)