I need switch case command to display two outputs with one input
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!