how to use soundsc with function
显示 更早的评论
Hi i have written a code which is executing perfectly for DTMF tones with this command. I am listening tones in speaker
dtmf=dtmfdial([1 1 9 9 2 2 0 0]);
The last portion of my code is
dtmf = cat(2, D{:});
soundsc(dtmf,12000);
Now the book says that following matlab command should play the tones corresponding to input vector,input,through computer speaker
sound(dtmfdial([input]),12000)
How can i achieve this, what should i do with my final cell dtmf???
采纳的回答
更多回答(5 个)
Wayne King
2011-10-6
Is your dtmf a Nx1 cell array? Can you do
soundsc(cell2mat(dtmf),Fs)
Wayne King
2011-10-6
Transpose your cell array
dtmf = dtmf';
Then try
soundsc(cell2mat(dtmf),8000);
moonman
2011-10-6
0 个投票
1 个评论
Walter Roberson
2011-10-8
When a function A is given as an argument to another function B, then the first output of A becomes an input to B. *Only* the first output of A is accessible when you do this: there is NO way in MATLAB to have multiple outputs of a function used as inputs to another function, other than assigning those multiple outputs to variables and passing in the variables.
类别
在 帮助中心 和 File Exchange 中查找有关 DTMF 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!