MATLAB Answers

How to loadmat file and run to my code in guide

1 view (last 30 days)
Emir az
Emir az on 11 Apr 2019
Commented: Jan on 17 Apr 2019
Hi Guys-Iam new in Gui matlab - I want to Load .mat file and use it from some algorithms and my every algorihtm have have new form to change some parametrs
how can do this thanks for help
[fname fpath findex]=uigetfile({'*.mat'},'Select the Vessel Signal file','multiselect','on');
d = load(fname);
image.jpg

  0 Comments

Sign in to comment.

Accepted Answer

Jan
Jan on 11 Apr 2019
Edited: Jan on 11 Apr 2019
[fname, fpath] = uigetfile({'*.mat'}, ...
'Select the Vessel Signal file','multiselect','on');
d = load(fullfile(fpath, fname));
The path might matter.

  2 Comments

Emir az
Emir az on 11 Apr 2019
acctually i load .mat file but cant pass .mat file bettween GUI(load mfile from main form and pass to PSO and GA)
Jan
Jan on 12 Apr 2019
@Emir az: I do not know, what "pass .mat file between GUI" means. What is the relation to "load mfile"? You do not load M-files manually. What is "main", "PSO" and "GA"?
Please search in the forum for "share data GUI". This might solve the problem. If not, please ask with more details. Post the current code and explain, at which lines what should be achieved. Take into account, that we cannot read your mind and your code remotely.

Sign in to comment.

More Answers (1)

Emir az
Emir az on 16 Apr 2019
if true
actually i used uigetfile and upload some file but cant share uploaded data from uigetfile to run (cant send it to run )
end

  1 Comment

Jan
Jan on 17 Apr 2019
I have no idea what "send it to run" means.

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!