storing data from function
Mostra commenti meno recenti
Hi,
I have this code in my function file: [sound, freq] = wavread(file) and for some reason sound and freq are not being stored in the workspace. What am I doing wrong?
1 Commento
Jonathan
il 31 Mag 2012
Risposta accettata
Più risposte (1)
Stephen
il 31 Mag 2012
So, you have:
function something
[sound, freq] = wavread(file);
end
? If so, you need to output those values like
function [sound, freq] = something
then when you call the function, it will spit out those values. Otherwise, they only exist in the temporary workspace of the function, which gets cleared out when it's done
3 Commenti
Jonathan
il 31 Mag 2012
Jonathan
il 31 Mag 2012
nazrin mokhtar
il 28 Feb 2020
i have same problem to save in workspace...can i know how to solve it
Categorie
Scopri di più su Audio I/O and Waveform Generation in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!