필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Could anyone please explain this codes ?

조회 수: 1 (최근 30일)
SUKUMAR NAGINENI
SUKUMAR NAGINENI 2018년 11월 24일
마감: MATLAB Answer Bot 2021년 8월 20일
inmenu=sprintf(' enter the number of the desired filter type:\n1) Low-pass \n2) High pass\n3) Band-pass \n4) Band-stop\n-> ');
filtertype=0;
while(filtertype==0)
filtertype=input(inmenu);
if(isempty(filtertype))
fitertype=0;
end
if ((filtertype<1) || (filtertype>4))
filtertype=0;
end
end
switch (filtertype)
case 1,
----
case 2,
-----
case 3,
------
case 4,
---
end
finally required output commands
  댓글 수: 7
Walter Roberson
Walter Roberson 2018년 11월 24일
sprintf is just constructing aa constant string with built in newline characters . input() passed aa string displays the string and accepts user input . The code tests to see if the user input is in range and uses switch if it is .
If the user enters a value such as 2.75 then the code will exit the loop because the checking is not good enough .
SUKUMAR NAGINENI
SUKUMAR NAGINENI 2018년 11월 25일
Thank you, I got it.

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by