Converting language into morse code

10 ビュー (過去 30 日間)
RandomGuy
RandomGuy 2014 年 4 月 8 日
回答済み: Star Strider 2014 年 4 月 8 日
Hi! My professor recently assigned a project on converting words into morse code. I won't have this site do my homework for me, but I had some basic questions on how to approach it. Part of the project is to have lower case letters give the same output as upper case letters, and I don't really understand how to do that. I tried just typing in A=a=MC_'.-.' or A=a & A='.-.' or a bunch of if____ statements, but it kept giving me errors, like A is an undefined variable. How can I fix that? Is there a specific command?
  1 件のコメント
RandomGuy
RandomGuy 2014 年 4 月 8 日
Thanks a lot all help is appreciated!

サインインしてコメントする。

回答 (2 件)

Walter Roberson
Walter Roberson 2014 年 4 月 8 日
  1 件のコメント
Joseph Cheng
Joseph Cheng 2014 年 4 月 8 日
編集済み: Joseph Cheng 2014 年 4 月 8 日
http://www.mathworks.com/help/matlab/ref/switch.html as an alternative to if statements

サインインしてコメントする。


Star Strider
Star Strider 2014 年 4 月 8 日
‘Way back when, there was a File Exchange program called morspeak, but I couldn’t find it again when I just now looked. (I modified it to add numbers, renaming it morspeaknx.) I've uploaded it here. I used it back when MATLAB and all personal computers were s-l-o-w, and I needed periodic progress reports on how the simulation was going, while I was doing other things. (I’ve been an Amateur Extra Class ham radio operator since 1968, so it was meaningful to me.) Use it or not as you wish.

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by