Effacer les filtres
Effacer les filtres

how to call Calling an audio file into an if function!

3 vues (au cours des 30 derniers jours)
Achchuthan Ganeshanathan
Achchuthan Ganeshanathan le 26 Mar 2013
function ProximityFunction (f)
%UNTITLED2 Summary of this function goes here
% Detailed explanation goes here
if 10000 < f && f < 12000
warningMessage = sprintf('Warning: your altitude = %f\nYou may crash!', f);
uiwait(warndlg('Increase Altitude'));
elseif 5000<f && f <10000;
warningMessage = sprintf('Warning: your altitude = %f\nYou may crash!', f);
uiwait(warndlg('Too close to terrain'));
elseif f <5000
warningMessage = sprintf('Warning: your altitude = %f\nYou may crash!', f);
uiwait(warndlg('PULL UP PULL UP'));
end
end
I want to add an audio file which i have already uploaded into matlab. would i be able to use play(player)to play the audio. I want 'play(player') to be after the warning message has been displayed and I am planning to add audio to the other warning messages. how can i get around this

Réponses (0)

Catégories

En savoir plus sur Audio I/O and Waveform Generation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by