필터 지우기
필터 지우기

I need switch case command to display two outputs with one input

조회 수: 2 (최근 30일)
benny
benny 2014년 11월 21일
편집: Star Strider 2014년 11월 21일
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개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by