how to call Calling an audio file into an if function!
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Audio I/O and Waveform Generation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!