storing data from function
显示 更早的评论
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 个)
Stephen
2012-5-31
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 个评论
Jonathan
2012-5-31
Jonathan
2012-5-31
nazrin mokhtar
2020-2-28
i have same problem to save in workspace...can i know how to solve it
类别
在 帮助中心 和 File Exchange 中查找有关 Audio I/O and Waveform Generation 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!