Question: use matlab or octave to code 7. (Character-Number Matching) Given an alphabetic character and a number, we wish to determine if the character corresponds to

 use matlab or octave to code 7. (Character-Number Matching) Given an

use matlab or octave to code

7. (Character-Number Matching) Given an alphabetic character and a number, we wish to determine if the character corresponds to the number in terms of alphabetic ordering. For instance, we consider 'a' and 'A' to correspond to the number 1, and we consider 'e' and 'E' to correspond to the number 5. Notice that we want the calculation to work for both lowercase and upper case letters. compare_char_num.m Script: Input variables: the_char and the_num representing the character and the number which we wish to determine if they match Output variables: is_equal which is a logical value representing whether or not the char- acter matches the number . Two sample cases are: >> the_char = 'e'; >> the num = 5; >> compare_char_num is_equal = 1 >> the_char = A; >> the num = 3; >> compare char is_equal = 0 {_num

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!