Matlab keeps attempting to execute SCRIPT gui_mainfcn as a function.

Hello,
So im trying to build a gui. I tried making one the first time and it worked probably, then suddenly i kept getting this error message. I deleted the first gui i built and i don't have it anymore because i thought i made a mistake in the code. but this error keeps occuring by every gui i build.
The error message is:
Attempt to execute SCRIPT gui_mainfcn as a function:
C:\Users\....\matlab\guide\gui_mainfcn.m
Error in untitled (line 42)
gui_mainfcn(gui_State, varargin{:});
can please anyone tell me how to slove this?
Regards
Ali

3 件のコメント

Kojiro Saito
Kojiro Saito 2022 年 1 月 5 日
In your gui_mainfcn.m under C:\Users\....\matlab\guide, could you check the script starts from "function".
function varargout = gui_mainfcn(gui_State, varargin)
Walter Roberson
Walter Roberson 2022 年 1 月 5 日
That is a very strange place for matlab to be installed. I wonder if it really is the matlab installation directory, or if somehow a lot of MATLAB got (perhaps corruptedly) cloned into user directories interfering with matlab.
Ali Albaidhani
Ali Albaidhani 2022 年 1 月 5 日
This is the student version that i got from the computers in my university.

サインインしてコメントする。

回答 (1 件)

yanqi liu
yanqi liu 2022 年 1 月 5 日
yes,sir,may be use
guide
to open the fig file,and run it

カテゴリ

ヘルプ センター および File ExchangeIntroduction to Installation and Licensing についてさらに検索

質問済み:

2022 年 1 月 4 日

コメント済み:

2022 年 1 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by