How to make a morse code encoder using switch case?

조회 수: 4 (최근 30일)
Ryan Doherty
Ryan Doherty 2017년 12월 5일
답변: Walter Roberson 2017년 12월 5일
I am trying to make a morse code encoder for a school project. I have all of my desired variables accounted for their respective morse code equivalents, but I cannot get the function to read more than one variable without it displaying a "invalid input argument". I also need it to stop once there are no more elements to read from. I have been using switch case for this encoder function. Any suggestions as to how I should approach this problem?
  댓글 수: 1
John D'Errico
John D'Errico 2017년 12월 5일
I think you need to learn to use vectors and arrays.
Don't write a function that requires you to enter many arguments, when a single vector will suffice.

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2017년 12월 5일

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by