GUI load file.mat and use it

1 visualizzazione (ultimi 30 giorni)
MartinM il 23 Gen 2020
Commentato: Stephen23 il 24 Gen 2020
I am creating a GUI and need to use data from m.file. It's working for the first file, but not or the second. Both are (double). Any idea?
matrice_losses.mat is load, but not MM...
  5 Commenti
Stephen23 il 24 Gen 2020
Bad code practices strike again!
You can easily avoid this error by loading into an output variable (which you should be doing anyway), e.g.:
S = load('matrice_losses.mat');
lamfit = S.matrice_losses(:,1).*1e-3;
lossdB = S.matrice_losses(:,2);

Accedi per commentare.

Risposta accettata

Jose Jeremias Caballero
Jose Jeremias Caballero il 24 Gen 2020
Modificato: Jose Jeremias Caballero il 24 Gen 2020
function PushB(hObject,eventdata,handles)
load matrice_losses
lossdB =matrice_losses(:,2);

Più risposte (0)


Scopri di più su Environment and Settings in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by