I need switch case command to display two outputs with one input
3 views (last 30 days)
Show older comments
I want wondering if switch case functions are able to put two different outputs with one input? I have the problem when user enters '2' I want the output to become 697hz,1336hz. Or would i have to set up each individual number to an output?
This is my graph 1,2,3,697hz are in a column 1,4,7,* are in a row
1 2 3 697hz
4 5 6 770hz
7 8 9
* 0 #
1209hz,1336hz,
This is what I tried .
function [lowFrequency, highFrequency]=pushbutton_to_DTMF(string)
Number = input('enter #','s');
switch Number
case{'1','2','3'};
disp('697')
case{'1','4','7','*'}
disp('1209')
end
0 Comments
Answers (0)
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!