I need load data .mat from file to my workspace. I used this code: filename = uigetfile({'*.mat'}, 'Select mat file'); but it´s non-functional. I need load data .mat to workspace and save to value with name x1. Is here somebody who know help? T
Mostra commenti meno recenti
I need load data .mat from file to my workspace. I used this code: filename = uigetfile({'*.mat'}, 'Select mat file'); but it´s non-functional. I need load data .mat to workspace and save to value with name x1. Is here somebody who know help? T
Risposta accettata
Più risposte (2)
filename = uigetfile({'*.mat'}, 'Select mat file');
load(filename)
or
load('yourmatfile') ; % directly be in the folder and load the file.
doc load
1 Commento
Dominika
il 31 Ott 2016
Alexandra Harkai
il 31 Ott 2016
If you know your file will be named data.mat, you don't need uigetfile, simply load will do that for you:
x1 = load('data.mat')
1 Commento
Dominika
il 31 Ott 2016
Categorie
Scopri di più su Workspace Variables and MAT Files in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!